Nupur Nagpure
Nupur Nagpure

Reputation: 21

Redshift Query CPU time

I am trying to fetch the query_cpu_time value from SVL_QUERY_METRICS table in Redshift. But I want the date and time also for all the queries. Is there any system table or solution for this?

Upvotes: 2

Views: 2254

Answers (1)

Sourav Jha
Sourav Jha

Reputation: 411

you can use SVL_QLOG table and create a join with SVL_QUERY_METRICS on column query.

SELECT t.starttime,
       t.endtime,
       m.query_cpu_time
FROM   svl_qlog AS t
       JOIN svl_query_metrics AS m
         ON t.query = m.query  

Upvotes: 3

Related Questions