Hello,
Is there a way in Vertica to find the top 10 queries by number of executions, total cost and total execution time?
I can do this in Oracle easily.
Thank you!
How to find Top 10 Queries
Moderator: NorbertKrupa
How to find Top 10 Queries
Have a GREAT day!
Re: How to find Top 10 Queries
Hi!
"COST" - it's not trivial, it require some scripting.
TOP10 by number of executions
TOP10 by total execution time
TOP10 by memory
"COST" - it's not trivial, it require some scripting.
TOP10 by number of executions
Code: Select all
SELECT request,
COUNT(*)
FROM query_requests
GROUP BY request
ORDER BY COUNT(*) DESC
LIMIT 10;
Code: Select all
SELECT request,
request_duration_ms
FROM query_requests
ORDER BY request_duration_ms DESC
LIMIT 10;
Code: Select all
SELECT request,
memory_acquired_mb
FROM query_requests
WHERE memory_acquired_mb IS NOT NULL
ORDER BY memory_acquired_mb DESC
LIMIT 10;