Re: explain analyze query execution time

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <rudyar(dot)cortes(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: explain analyze query execution time
Date: 2011-11-22 13:26:11
Message-ID: 4ECB4E93020000250004339B@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rudyar wrote:

> what tool you recommend for measure the query "real" query
> execution time?

The -hackers list is for discussion to coordinate development of the
PostgreSQL database product. For user questions like this, please
pick a more appropriate list based on the descriptions here:

http://www.postgresql.org/community/lists/

While any further follow-up should be on another list, I'll briefly
answer here. EXPLAIN ANALYZE is great for seeing how a query is
being executed, but for accurate timing of how long the query runs
without generating all that extra information, you can measure it on
the client side, or turn on logging of statements running long than
some particular time. In psql you can use "\timing on", in Java you
can run System.currentTimeInMillis() before and after running the
query, etc.

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rudyar 2011-11-22 13:41:05 Re: explain analyze query execution time
Previous Message Albe Laurenz 2011-11-22 13:11:32 Review: CHECK FUNCTION statement