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

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Matthew Wakeling" <matthew(at)flymine(dot)org>,<jmpoure(at)free(dot)fr>, "PostgreSQL Performance" <pgsql-performance(at)postgresql(dot)org>, "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time
Date: 2009-12-02 21:33:04
Message-ID: 4B1688B0020000250002CF96@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> And yeah, I think the statistical support is pretty crummy.

Do you know, off-hand, why the estimated row count for a "Nested
Loop Left Join" is not the product of the estimates for the two
sides? (I fear I'm missing something important which lead to the
current estimates.)

Estimates extracted from the problem plan:

Nested Loop Left Join (rows=806903677108)
-> Nested Loop Left Join (rows=203176856)
-> Nested Loop Left Join (rows=51160)
-> Nested Loop Left Join (rows=28)
-> Append (rows=4)
-> Append (rows=2)
-> Append (rows=2)

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-12-02 21:48:32 Re: Order by (for 15 rows) adds 30 seconds to query time
Previous Message Tom Lane 2009-12-02 20:25:26 Re: Order by (for 15 rows) adds 30 seconds to query time