Skip to content

SQL Interface


Overview

HeliosDB Full extends standard SQL with Change Data Capture (CDC) commands (CDC streams are planned), GPU commands (no effect in the public release build; NVIDIA CUDA builds on request), and multi-region and autoscaling commands that are planned with Full clustering. All commands are sent through standard PostgreSQL protocol clients (psql, JDBC, etc.).

Key Capabilities

CapabilityDescriptionProtocol
Standard SQLFull SQL query supportPostgreSQL wire protocol
GPU OperationsEnable/disable GPU acceleration (CUDA builds on request)SET/SHOW commands
Multi-RegionConfigure regions, consistency (planned)SET/SHOW commands
AutoscalingControl compute scaling (planned)SET/SHOW commands
CDCRecent change events today (SHOW CDC EVENTS); streams to external systems plannedSHOW; CREATE/ALTER/DROP planned

SQL Extensions

GPU Operations

CommandDescription
SET gpu_enabled = true/falseEnable/disable GPU acceleration
SET gpu_memory_limit = '4GB'Set GPU memory limit
SHOW gpu_statusDisplay GPU configuration
SHOW gpu_devicesList available GPU devices

Multi-Region Management

CommandDescription
SHOW REGIONSDisplay all regions
SHOW REGION STATECurrent region configuration
SET preferred_region = 'region'Set preferred region
SET consistency_level = 'level'Set consistency (eventual/strong/quorum)

Autoscaling Management

CommandDescription
SHOW AUTOSCALE STATECurrent autoscaling metrics
SET autoscale_enabled = true/falseEnable/disable autoscaling
SET autoscale_target_cu = NSet target compute units
SET autoscale_min_instances = NSet minimum instances
SET autoscale_max_instances = NSet maximum instances
SHOW COMPUTE NODESList all compute nodes

Change Data Capture

CDC streams are planned: the current release does not accept these statements. SHOW CDC EVENTS [LIMIT n] reads the server’s in-memory log of recent INSERT, UPDATE and DELETE statements today.

CommandDescription
SHOW CDC EVENTS [LIMIT n]Recent change events (available)
CREATE CHANGE DATA CAPTURE ON tableCreate CDC stream (planned)
SHOW CDC STREAMSList active streams
SHOW CDC STREAM STATE nameStream details
ALTER CDC STREAM name PAUSE/RESUMEControl stream
DROP CHANGE DATA CAPTURE nameRemove stream

Client Compatibility

HeliosDB’s SQL interface is compatible with standard PostgreSQL clients:

ClientResultNotes
psqlSupportedFull compatibility
JDBCSupportedPostgreSQL JDBC driver
Python (psycopg2)SupportedStandard connection
Go (pgx)SupportedNative driver
Node.js (pg)SupportedPostgreSQL client
.NET (Npgsql)SupportedADO.NET provider

Quick Examples

Enable GPU Acceleration

SET gpu_enabled = true;
SET gpu_memory_limit = '8GB';
-- Queries will now use GPU when beneficial
SELECT region, SUM(sales), AVG(price)
FROM sales_data
GROUP BY region;

Configure Multi-Region (planned)

-- Planned with Full clustering; no effect today
SET preferred_region = 'us-west-2';
SET consistency_level = 'quorum';
-- Queries routed to preferred region
SELECT * FROM products;

Create CDC Stream (planned)

-- Planned syntax; today, run SHOW CDC EVENTS to see recent changes
CREATE CHANGE DATA CAPTURE ON users
TO KAFKA 'localhost:9092' TOPIC 'users-changes'
FORMAT JSON;
SHOW CDC STREAMS;

See Also: HeliosDB Feature Index