From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrus <eetasoft@online.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: CPU usage goes to 100%, query seems to ran forever
Date: Thu, 27 Apr 2006 15:09:13 -0400
Message-ID: <14690.1146164953@sss.pgh.pa.us> (raw)
In-Reply-To: <e2r3h0$1jto$1@news.hub.org>
References: <e2r3h0$1jto$1@news.hub.org>
"Andrus" <eetasoft@online.ee> writes:
> I have small database running in 8.1.3 in W2K server.
> The following query causes Postgres process to use 100% CPU and seems to run
> forever.
> If I change '1EEKPANT' to less frequently used item code, it runs fast.
You have ANALYZEd all these tables recently, I hope? The planner
certainly doesn't think this query will take very long.
To find out what's wrong, you're going to have to be patient enough to
let an EXPLAIN ANALYZE run to completion. Plain EXPLAIN won't tell.
regards, tom lane
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: tgl@sss.pgh.pa.us, eetasoft@online.ee
Subject: Re: CPU usage goes to 100%, query seems to ran forever
In-Reply-To: <14690.1146164953@sss.pgh.pa.us>
* 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