Re: Order by (for 15 rows) adds 30 seconds to query time - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Order by (for 15 rows) adds 30 seconds to query time
Date
Msg-id 4B1688B0020000250002CF96@gw.wicourts.gov
Whole thread Raw
In response to Re: Order by (for 15 rows) adds 30 seconds to query time  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Order by (for 15 rows) adds 30 seconds to query time
List pgsql-performance
Tom Lane <tgl@sss.pgh.pa.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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time
Next
From: Tom Lane
Date:
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time