Skip to main content

Queries reporting longer duration than reality, in query_profiles

  • November 15, 2014
  • 3 replies
  • 16 views

DrWeird
I am attempting to get query durations from query_profiles table, using the query_start and query_duration_us columns. Duration should be query_start + query_duration_us right? Well, when reviewing this assumption, I find that a particular query I run has a query_start + query_duration time of 5.59 Hours, but when looking at cluster IO, and disk, when only this query was running, I get a very clear indication the query really only ran for 3.15 Hours. Additionally, the highest "time" column entry for this query in query_profile indicates the very same time as the query apparently ended, as indicated by cluster load.

Is it possible query_duration_us is not tracking real time, but something like CPU time?
Is there a better way to determine query_start and query_end?

For more information, this is a Vertica HDFS connector COPY command from a Hadoop cluster, into Vertica.

Thanks!

3 replies

zvika_gutkin
Forum|alt.badge.img
  • Participating Frequently
  • November 17, 2014
please take a look at resource_acquisition to find also the query duration .

is it the same as query profile ? did this query went to queue ?

DrWeird
  • Author
  • New Participant
  • November 18, 2014
Consulting the resource_acquisitions table, I see that there are several entries for this query, and a couple of them have a release_timestamp at the long timeframe, but most ended at the short timeframe. I suppose perhaps the resources remained occupied by this query long after it really finished?

zvika_gutkin
Forum|alt.badge.img
  • Participating Frequently
  • November 26, 2014
Can you post the result set  ?