From: Craig Ringer <ringerc@ringerc.id.au>
To: Yan Chunlu <springrider@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: how could select id=xx so slow?
Date: Fri, 06 Jul 2012 19:16:27 +0800
Message-ID: <4FF6C90B.8070402@ringerc.id.au> (raw)
In-Reply-To: <CAOA66tEJLDOt4JpJ0RwOEsgizfQPWkCHd+SgT7kbiHix_io18A@mail.gmail.com>
References: <CAOA66tEJLDOt4JpJ0RwOEsgizfQPWkCHd+SgT7kbiHix_io18A@mail.gmail.com>
On 07/06/2012 02:17 PM, Yan Chunlu wrote:
> so I wonder could this simple select is innocent and affected badly by
> other queries? how could I find those queries that really slow down
> the database?
It might not be other queries. Your query could be taking that long
because it was blocked by a lock during maintenance work (say, an ALTER
TABLE). It's also quite possible that it was held up by a slow
checkpoint; check your logs to see if there are warnings about
checkpoint activity.
--
Craig Ringer
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: ringerc@ringerc.id.au, springrider@gmail.com
Subject: Re: how could select id=xx so slow?
In-Reply-To: <4FF6C90B.8070402@ringerc.id.au>
* 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