From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Brice Ruth <brice@webprojkt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Query never returns ...
Date: Thu, 8 Feb 2001 11:20:45 -0600
Message-ID: <20010208112045.B5409@rice.edu> (raw)
In-Reply-To: <3A82C720.F1E3B8FF@webprojkt.com>
References: <3A82C15D.9375591A@webprojkt.com>
<3A82C720.F1E3B8FF@webprojkt.com>
Brice -
What does EXPLAIN say for that query? With empty tables, I get two index scans,
a merge join, and two sorts. I'm guessing wildly that you've got a non-optimal
sort strategy happening somehow, given the four fold ORDER BY clause.
Ross
Here's the empty version:
NOTICE: QUERY PLAN:
Sort (cost=84.25..84.25 rows=100 width=64)
-> Merge Join (cost=8.30..80.93 rows=100 width=64)
-> Index Scan using pk_tblmedcond on tblmedcond (cost=0.00..60.00 rows=1000 width=36)
-> Sort (cost=8.30..8.30 rows=10 width=28)
-> Index Scan using pk_tblsidedruglink on tblsidedruglink (cost=0.00..8.14 rows=10 width=28)
EXPLAIN
On Thu, Feb 08, 2001 at 10:19:43AM -0600, Brice Ruth wrote:
> FYI - I let the query run for 11.5 minutes before killing it off. It
> had consumed 11 minutes, 18 seconds of CPU time (reported by ps). The
> following messages are from the server log, I'm pasting in all messages
> directly following the query:
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: reedstrm@rice.edu, brice@webprojkt.com
Subject: Re: Query never returns ...
In-Reply-To: <20010208112045.B5409@rice.edu>
References: <3A82C15D.9375591A@webprojkt.com> <3A82C720.F1E3B8FF@webprojkt.com> <20010208112045.B5409@rice.edu>
* 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