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

Re: Query performance inconsistant.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Schumacher <matt(dot)s(at)aptalaska(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query performance inconsistant.
Date: 2006-08-31 16:45:28
Message-ID: 9462.1157042728@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Matthew Schumacher <matt(dot)s(at)aptalaska(dot)net> writes:
> I have been having performance problems with my DB so this morning I
> added some config to log queries that take more than 250ms.  The result
> is surprising because some queries will take as long as 10 seconds, but
> then you do a explain analyze on them they show that indexes are being
> used and they run very fast.

Is it possible that it's not directly that query's fault?  For instance
it could be blocked by a lock held by some other transaction.  I can't
unfortunately think of any very nice way to deduce this from log entries
... you'd have to catch it in the act and look into pg_locks to find out
who's the perpetrator.

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Robert BernierDate: 2006-08-31 17:28:23
Subject: Re: Thought provoking piece on NetBSD
Previous:From: Matthew SchumacherDate: 2006-08-31 16:20:46
Subject: Query performance inconsistant.

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