Yandex DB: How can I see top queries by CPU time spent?

65 Views Asked by At

I am working with YDB (Yandex database) and need to select top CPU time spent queries. How can I get them? Thanks in advance.

I was looking into documentation but failed to find the answer. I am a rookie in cloud systems like that.

1

There are 1 best solutions below

0
Denis Kiryanov On BEST ANSWER

You can select top CPU queries with the code like this:

SELECT
    IntervalEnd,
    CPUTime,
    QueryText
FROM `.sys/top_queries_by_cpu_time_one_minute`
ORDER BY IntervalEnd DESC, CPUTime DESC
LIMIT 100