Skip site navigation (1) Skip section navigation (2)

Re: Postgres query completion status?

From: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
To: Richard Neill <rn214(at)cam(dot)ac(dot)uk>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres query completion status?
Date: 2009-11-20 06:07:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Richard --

 You might post the results of "EXPLAIN ANALYZE <your SQL here>;" ... be sure to run it in a transaction if you want to be able roll it back. Perhaps try "EXPLAIN <your SQL>;" first as it is faster, but EXPLAIN ANALYZE shows what the planner is doing.

You wrote:

> P.S. Sometimes, some queries seem to benefit from being cancelled and then immediately
> re-started. As there are being run in a transaction, I can't see how this could make a difference.
> Am I missing anything obvious?  Occasionally, a re-start of postgresql-8.4l itself seems to help.

This may be the result of caching of the desired rows, either by PostgreSQL or by your operating system. The rollback wouldn't effect this -- the rows are already in memory and not on disk waiting to be grabbed -- much faster on all subsequent queries.


Greg Williamson

-- Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
To make changes to your subscription:


In response to


pgsql-performance by date

Next:From: Richard NeillDate: 2009-11-20 06:32:31
Subject: Re: Postgres query completion status?
Previous:From: Richard NeillDate: 2009-11-20 05:32:45
Subject: Postgres query completion status?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group