Skip site navigation (1) Skip section navigation (2)

Re: Order by (for 15 rows) adds 30 seconds to query time

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-performance(at)postgresql(dot)org>,<tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <matthew(at)flymine(dot)org>,<jmpoure(at)free(dot)fr>, <craig(at)postnewspapers(dot)com(dot)au>
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time
Date: 2009-12-26 20:15:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Tom Lane wrote:
> That does look weird. Do we have a self-contained test case?
I've been tinkering with this and I now have a self-contained test
case (SQL statements and run results attached). I've debugged through
it and things don't seem right in set_append_rel_pathlist, since
childrel->rows seems to contain the total rows in each table rather
than the number which meet the join conditions. That is reflected in
the output from OPTIMIZER_DEBUG logging, but not in the query plan
I'm afraid I'm a bit stuck on getting farther.  Hopefully this much
will be of use to someone.  If you could point out where I should
have looked next, I'd be grateful.  :-)

Attachment: testcase2.sql
Description: application/octet-stream (811 bytes)
Attachment: testcase2.out
Description: application/octet-stream (5.3 KB)
Attachment: testcase2.log
Description: application/octet-stream (2.5 KB)


pgsql-performance by date

Next:From: Glyn AstillDate: 2009-12-27 15:36:00
Subject: Re: SATA drives performance
Previous:From: Scott MarloweDate: 2009-12-25 00:52:22
Subject: Re: SATA drives performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group