Re: Out of control query

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Jason Long <mailing(dot)list(at)supernovasoftware(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Out of control query
Date: 2008-12-20 03:19:02
Message-ID: 494C6426.5090204@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jason Long wrote:

> For some reason the search gets out of control and consumes all CPU.
> [snip]
> What seems strange to me is that one one core of my Quad core x5472 is
> 100%. The others show minimal usage.

Consuming all of one CPU is quite normal if a query requires a lot of
CPU-intensive work such as some types of text processing, calculations,
etc. I have quite a few CPU-bound queries in the system I'm working
with, and they cause no problems.

> I would think that other users would get a different core and one query
> could not deadlock the whole system for everyone.

That should indeed be the case. Are your other users completely unable
to run queries, or are they just too slow? Have you tested by connecting
with `psql' and running queries by hand? Have you checked the pg_locks
table to see if there's any possible locking issue preventing the other
users from proceeding with their queries? Is your disk subsystem also
working hard during these difficult queries?

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reg Me Please 2008-12-20 08:51:57 Re: [PGSQL 8.3.5] How to handle FKs with partitioning?
Previous Message Joshua D. Drake 2008-12-19 22:30:51 Re: Out of control query