Is the running_time expressed in seconds or ms?
Hi @brian
If you check the column description, then it's written:
The time, in milliseconds, this query took to complete.
Hey @Flamber -- where's the description to which you refer?
metabase-internal=> \d query_execution;
Table "public.query_execution"
Column | Type | Collation | Nullable | Default
--------------+--------------------------+-----------+----------+---------------------------------------------
id | integer | | not null | nextval('query_execution_id_seq'::regclass)
hash | bytea | | not null |
started_at | timestamp with time zone | | not null |
running_time | integer | | not null |
result_rows | integer | | not null |
native | boolean | | not null |
context | character varying(32) | | |
error | text | | |
executor_id | integer | | |
card_id | integer | | |
dashboard_id | integer | | |
pulse_id | integer | | |
database_id | integer | | |
cache_hit | boolean | | |
Indexes:
"query_execution_pkey" PRIMARY KEY, btree (id)
"idx_query_execution_card_id" btree (card_id)
"idx_query_execution_card_id_started_at" btree (card_id, started_at)
"idx_query_execution_context" btree (context)
"idx_query_execution_executor_id" btree (executor_id)
"idx_query_execution_query_hash_started_at" btree (hash, started_at)
"idx_query_execution_started_at" btree (started_at)
Publications:
"metabase_publication"
metabase-internal=>
Hey dhk
You can use whatever SQL application such as pgAdmin to see that information.
You can also run queries, for example, this would be used for a postgres table.
SELECT
c.relname AS table_name,
a.attname AS column_name,
d.description
FROM
pg_description d
JOIN pg_class c ON d.objoid = c.oid
JOIN pg_attribute a ON d.objsubid = a.attnum AND c.oid = a.attrelid
WHERE c.relname = 'query_execution'