Most of these example queries use the
data_type_coverage table available with the Ocient Simulator. For details, see Ocient Simulator.Segment System Catalog Tables
For specific column definitions of the system catalog tables referenced in these examples, see the Storage section of the System Catalog page.Segment Size
Check the size of segments and return insights about the segment storage allocation and the number of table rows contained in each segment.SQL
Text
Page and Segment Information
Check the details for pages and segments in the system.SQL
Text
Storage Spaces on a System
Check all storage spaces on your system.SQL
Text
Query Management System Catalog Tables
For specific column definitions of the system catalog tables referenced in these examples, see the Monitoring section of the System Catalog page.Running Queries
Check all queries currently running on the system. The output of thesys.queries table depends on what database you are logged into and your system role. For details, see Query Visibility.
SQL
Text
Recent Queries
Check the most recent queries completed by the system. The output of thesys.completed_queries table depends on what database you are logged into and your system role. For details, see Query Visibility.
SQL
Text
Database and Table System Catalog Tables
For specific column definitions of the system catalog tables used in these examples, see the Databases section of the System Catalog page.Database Sizes
Check the total size of all databases on your system.SQL
Text
Table Sizes
Check the total size of all tables on the system.SQL
Text
Table Statistics
This query provides a breakdown of table statistics and partition information.SQL
Text
Compression
Check the information on the compression for each column in the specified table.SQL
Text
Compression for the Entire Table
This query summarizes the total compression of the specified table. In the example, replace the table name and schema name accordingly.SQL
Text
Index Size
Check the total size of each index across the different segment groups. In this example, the table has three secondary indexes added before loading data.SQL
Text
Column Sizes
This query finds the size of all columns for the specified table. Before running this query on your system, replacetable_name in the example.
SQL
Text
data_type_coverage.
Column Cardinality
This query finds the cardinality of each column in the specified table. Knowing the cardinality is useful for determining which compression scheme to use for a column.SQL
Text
Cluster and Node System Catalog Tables
For specific column definitions of the system catalog tables referenced in these examples, see the System section of the System Catalog page.Nodes Present on a System
Check the status of all nodes in the system.SQL
Text
Nodes Roles on a System
Check the roles of each node in the system.SQL
Text
Node Status
Check the operational status, software versions, and assigned roles of your nodes. Possible status values includeACTIVE, STARTING, STOPPING, ERROR, UNKNOWN, or UNREACHABLE.
SQL
Text
Foundation Nodes on a Specific Cluster
Check for all Foundation Nodes on your system clusters.SQL
Text
Drive Status
Check the status of all drives assigned to nodes in the system.SQL
Text
Roles, Privileges, and Service Class System Catalog Tables
For specific column definitions of the system catalog tables referenced in these examples, see the User Management section of the System Catalog page.Group Assignment for Users
Check for all users on the system and their corresponding assigned group.SQL
Text
User Roles
Check for all users on the system and their assigned role.SQL
Text
User Privileges
Check the privileges for the specific table name. Before running on your system, replaceusername in the example.
SQL
Text
Privileges for the Specific Table
Check the granted privileges across all database objects of the specific type, such asGROUP, TABLE, or DATABASE. In this example, the query checks for TABLE privileges.
SQL
Text
Groups Assigned to Service Classes
Check for the service class assignment for all groups.SQL
Text
Service Class Settings
Check for the settings for the specified service class. Before running on your system, replace thehigh priority service class name in the example.
For details about service class settings, see Workload Management and Service Classes.
SQL
Text
Service Classes for the Specific User
Check for the service class of the specific user. Before running on your system, replace thejmack@test username in this example with the specific username that you want to query.
SQL
Text
Data Pipelines
Pipeline Events
While your pipeline is running, the pipeline generates events in thesys.pipeline_events system catalog table to mark significant checkpoints when something has occurred. In this example, you execute the CREATE PIPELINE and START PIPELINE SQL statements on the pipeline named my_pipeline and let the pipeline complete. As expected, the CREATED, STARTED, and COMPLETED events appear. For details about the lists of files, see the sys.pipeline_files system catalog table.
Pipeline events include messages from many different tasks. These events are the background processes that execute across different Loader Nodes during pipeline operation. For details about tasks, you can query the sys.tasks and sys.subtasks system catalog tables.
SQL
SQL
Pipeline Metrics
Find metrics that measure the performance and activity of a pipeline in thesys.pipeline_metrics system catalog table. This table contains one row for each metric at a specified point in time. A common use of this data is to plot metric values over time to examine the behavior of a pipeline.
Metric Types
Metrics are either instantaneous or incremental:
- Instantaneous metrics reflect the current value of a counter at the time of the metric collection. These values can increase or decrease based on the current state or rate of the metric.
- Incremental metrics increment over time and reflect the cumulative value for a specified counter.
updated_at column shows the metric collection time.
For example, if you are interested in the number of transformed record bytes, you can execute this query. The value increases over time as the pipeline runs.
SQL
SQL
pipeline_id, extractor_task_id, partition_id, and sink_index. If the value of any of these columns is NULL, the scope applies to all values in that dimension.
For example, because the partition_id and sink_index columns are NULL for the metric count.record.bytes.transformed, its scope applies to the pipeline indicated by the pipeline_id and extractor_task_id across all sinks and partitions.
An extractor_task_id is the internal identifier used when the Ocient System executes a pipeline process on a Loader Node. A pipeline might have many of these processes across time and loaders.
Example
Retrieve the most recent snapshot for each metric and aggregate the values to produce a single value for a pipeline.
SQL
SQL

