DB
SQL reference

Introspection and control

Discover objects and functions, describe schemas, explain plans, and cancel work.

Show catalog objects

SHOW TABLES;
SHOW VIEWS;
SHOW MATERIALIZED VIEWS;
SHOW TRANSFORMS;

SHOW STORAGE RESOURCES;
SHOW STORAGE POOLS;
SHOW STORAGE POLICIES;

Function discovery supports an optional pattern:

SHOW FUNCTIONS;
SHOW FUNCTIONS LIKE 'json%';

SHOW FUNCTIONS is the live function inventory for the running revision. There is no system.functions relation in the current engine.

Reconstruct definitions

SHOW CREATE TABLE balances;
SHOW CREATE TRANSFORM copy_trades;

Persist reviewed schema definitions in source control as well as inspecting them from the engine.

Describe a relation

DESCRIBE balances;
DESC account_attributes;

Use this before binding a dynamic client or investigating a type mismatch.

Explain

EXPLAIN SELECT market, sum(amount)
FROM trades
GROUP BY market;

EXPLAIN STREAM SELECT market, count()
FROM trades
GROUP BY market;

EXPLAIN reports the bound logical execution shape. It does not replace runtime observation of row counts, memory, spill, or latency.

Cancel a running query

Find the target in system.queries, then cancel it using the identifier reported by that table:

SELECT query_id, state, elapsed_us, statement
FROM system.queries
ORDER BY elapsed_us DESC;

CANCEL QUERY 42;

Cancellation is cooperative at engine checkpoints. system.queries contains live profiles only, so a completed or cancelled query disappears instead of remaining as a terminal row. Wait for that disappearance, then inspect the archived outcome with a bounded poll—the live row is removed just before its query-log record is appended:

SELECT query_id, ok, error, ended_ms, exec_us
FROM system.query_log
WHERE query_id = 42
ORDER BY ended_ms DESC
LIMIT 1;

Runtime tables

NYXDB exposes bounded local snapshots such as system.queries, system.query_log, system.events, system.metrics, system.subscriptions, system.parts, and system.memory_profile. Schemas and operational queries are documented under System tables.

Each system-table read is coherent for that table. Separate reads across multiple system tables are not one atomic cross-table snapshot.

On this page