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

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

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> wrote:
>> Doesn't the planner have some ... issues ... with estimation of
>> row counts on joins over unions? Or is my memory just more faulty
>> than usual?

> So far I can't tell if it's views with unions or (as I suspect)
> inheritance.

As of recent versions there shouldn't be a lot of difference between
inheritance and UNION ALL subqueries --- they're both "appendrels"
to the planner. And yeah, I think the statistical support is pretty
crummy.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2009-12-02 21:33:04 Re: Order by (for 15 rows) adds 30 seconds to query time
Previous Message Kevin Grittner 2009-12-02 18:47:27 Re: Order by (for 15 rows) adds 30 seconds to query time