Reference

System Tables

System tables are Metaform's built-in "catalog" for understanding the engine itself and the data it can see. They expose metadata (schemas, tables, columns, and files), configuration (system/session options, as well as boot parameters), ensemble state (nodes and connections), available SQL functions, and operational telemetry (query profiles, threads, and memory).


System Visibility

A deployment of Metaform is made up of one or more Node — lightweight processes that coordinate queries and execute fragments of work. Knowing which Nodes are active is essential for operations.

Table: sys.nodes

  • Purpose: Shows every Node that is currently available.

Columns

ColumnDescription
hostnameThe network host name of the Node.
user_portPort used for client connections (e.g., JDBC).
control_portPort used for inter-Node control messages and coordination.
data_portPort used for transferring data blocks between Nodes.
http_portPort for the Metaform Console and REST API access.
currentIndicates whether this Node is the current leader in the cluster.
versionThe running Metaform software version on this Node.
stateThe operational state of the Node (e.g., ONLINE, OFFLINE, QUIESCENT).

Example: Verify all Nodes are alive

SELECT hostname, `current` FROM sys.nodes;

💡 Troubleshooting Tip: If you expect three nodes and only see two, you’ve got a ensemble health issue. This table is often the first stop for troubleshooting.


Query Monitoring

Table: sys.profiles

Execution profiles record each completed query’s timing and resource usage, making it easy to spot slow stages and regressions.

Columns

ColumnDescription
queryIdUnique ID of the query
startTimeQuery start timestamp
endTimeQuery end timestamp
totalTimeWall-clock duration (endTime - startTime)

Example: Inspect the most recent queries

SELECT `queryId`, `startTime`, `endTime`, `totalTime`
FROM sys.profiles
ORDER BY `startTime` DESC
LIMIT 5;
Troubleshooting Tip
High `totalTime` values often indicate inefficient joins.

3. Functions and Built-ins

Metaform comes with over 3,000 functions covering a broad set of SQL functions. Discovering them is straightforward.

Table: sys.functions

  • Columns: name, signature, returnType.

Example: Search for count functions

SELECT name, signature, returnType
FROM sys.functions
WHERE name LIKE '%count%';

This is especially handy when you’re unsure of the exact spelling or return type.


4. Versioning

Table: sys.version

Every Metaform deployment reflects a specific version.

SELECT version
FROM sys.version;

Use this when reporting bugs or ensuring compatibility across clusters.


Putting It Together

System tables aren’t just reference material — they are diagnostic tools. A typical debugging workflow might look like this:

  1. Check sys.nodes to ensure all nodes are online.
  2. Dive into sys.profiles for completed queries to see where time was spent.
  3. Use sys.version when reporting issues upstream.

By mastering these tables, you can move from guessing about Metaform's behavior to explaining and controlling it.