From: Gregory Stark <stark@enterprisedb.com>
To: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: TIMING A QUERY ???
Date: Wed, 11 Jul 2007 17:11:09 +0100
Message-ID: <87bqeiapk2.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <20070711153911.GQ1241@phlogiston.dyndns.org>
References: <11542393.post@talk.nabble.com>
<20070711153911.GQ1241@phlogiston.dyndns.org>
"Andrew Sullivan" <ajs@crankycanuck.ca> writes:
> On Wed, Jul 11, 2007 at 08:21:40AM -0700, smiley2211 wrote:
>>
>> How can I get the time it takes a query to execute - explain analyze is
>> taking over 5 hours to complete
>
> You can't get it any faster than what explain analyse does: it runs
> the query. How else would you get the answer?
explain analyze does actually run slower than the actual query because it has
to check the time before and after each step of the query, potentially
thousands of times. If it's a disk-bound query that doesn't matter much but if
it's a cpu-bound query it can.
>> ...can I use \timing??? I don't get any time when using the
>> \timing option...
Yes you can use \timing. You'll have to provide more information of what
you're doing before anyone can help you.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stark@enterprisedb.com, ajs@crankycanuck.ca
Subject: Re: TIMING A QUERY ???
In-Reply-To: <87bqeiapk2.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox