5.20. System Connector

The System connector provides information and metrics about the currentlyrunning Presto cluster. It makes this available via normal SQL queries.

Configuration

The System connector doesn’t need to be configured: it is automaticallyavailable via a catalog named system.

Using the System Connector

List the available system schemas:

  1. SHOW SCHEMAS FROM system;

List the tables in one of the schemas:

  1. SHOW TABLES FROM system.runtime;

Query one of the tables:

  1. SELECT * FROM system.runtime.nodes;

Kill a running query:

  1. CALL system.runtime.kill_query(query_id => '20151207_215727_00146_tx3nr', message => 'Using too many resources');

System Connector Tables

metadata.catalogs

The catalogs table contains the list of available catalogs.

metadata.schema_properties

The schema properties table contains the list of available propertiesthat can be set when creating a new schema.

metadata.table_properties

The table properties table contains the list of available propertiesthat can be set when creating a new table.

runtime.nodes

The nodes table contains the list of visible nodes in the Prestocluster along with their status.

runtime.queries

The queries table contains information about currently and recentlyrunning queries on the Presto cluster. From this table you can find outthe original query text (SQL), the identity of the user who ran the queryand performance information about the query including how long the querywas queued and analyzed.

runtime.tasks

The tasks table contains information about the tasks involved in aPresto query including where they were executed and and how many rowsand bytes each task processed.

runtime.transactions

The transactions table contains the list of currently open transactionsand related metadata. This includes information such as the create time,idle time, initialization parameters, and accessed catalogs.

System Connector Procedures

  • runtime.killquery(_query_id, message)
  • Kill the query identified by query_id. The query failure messagewill include the specified message.