Appearance
fact.top_query
The fact.top_query
allows a user to query for top 100 queries that ran across multiple billing runs and see the queries in each of them.
The query date/time columns are taken from submit_time
in sys.log_query
if
- the query has completed running when the metering runs.
- the submit time is larger than the last metering date.
However, if the query ran for more than an hour (over multiple extraction times), then the date/time of the metering_run
will be considered.
Column Name | Data Type | Description | Example |
---|---|---|---|
metering_run | TIMESTAMPTZ | The date time at which metering begins. | 2023-12-21T05:50:12.650643Z |
datetime_start | TIMESTAMPTZ | The submit_time of the query. Mapped via sys.log_query . | 22528 |
query_sk | BIGINT | A sequencer generated unique ID for each query. Foreign key to dim.query . | 153600 |
user_sk | BIGINT | A sequencer generated unique ID for each user. Foreign key to dim.user . Mapped via username column in sys.log_query . | 22528 |
cluster_sk | BIGINT | A sequencer generated unique ID for each cluster. Foreign key to sys.dim_cluster pointing to the actual config of the cluster. Mapped to the surrogate key via the newly introduced cluster_id column in sys.log_query . | 25600 |
client_sk | BIGINT | A sequencer generated unique ID for each client. Foreign key to sys.dim_client . Mapped via client_ip which is found via multiple joins to sys.session and session_id in sys.log_query | 1024 |
application_sk | BIGINT | A sequencer generated unique ID for each application. Foreign key to sys.dim_application . Mapped via application_name in sys.log_query . | 108544 |
vcpu_estimate_seconds | BIGINT | The total vcpu_seconds consumed while executing the query. | 306112 |
query_id | BIGINT | The query id as per the entry logged in sys.log_query or sys.query . | 4707296 |