Re: how could select id=xx so slow?

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Yan Chunlu <springrider(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: how could select id=xx so slow?
Date: 2012-07-06 11:16:27
Message-ID: 4FF6C90B.8070402@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2012-07-06 11:29:21 Re: PostgreSQL db, 30 tables with number of rows < 100 (not huge) - the fastest way to clean each non-empty table and reset unique identifier column of empty ones.
Previous Message Daniel Farina 2012-07-06 09:46:18 Re: how could select id=xx so slow?