Re: plan time of MASSIVE partitioning ...

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Leonardo Francalanci <m_lists(at)yahoo(dot)it>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plan time of MASSIVE partitioning ...
Date: 2010-11-13 03:47:02
Message-ID: 201011130347.oAD3l2X16785@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Leonardo Francalanci <m_lists(at)yahoo(dot)it> writes:
> >> Cases with lots of irrelevant indexes. Zoltan's example had 4 indexes
> >> per child table, only one of which was relevant to the query. In your
> >> test case there are no irrelevant indexes, which is why the runtime
> >> didn't change.
>
> > Mmh... I must be doing something wrong. It looks to me it's not just
> > the irrelevant indexes: it's the "order by" that counts.
>
> Ah, I oversimplified a bit: actually, if you don't have an ORDER BY or
> any mergejoinable join clauses, then the possibly_useful_pathkeys test
> in find_usable_indexes figures out that we aren't interested in the sort
> ordering of *any* indexes, so the whole thing gets short-circuited.
> You need at least the possibility of interest in sorted output from an
> indexscan before any of this code runs.

FYI, I always wondered if the rare use of mergejoins justified the extra
planning time of carrying around all those joinpaths.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-13 03:55:54 Re: plan time of MASSIVE partitioning ...
Previous Message Andrew Dunstan 2010-11-13 03:39:23 Re: pgsql: Improved parallel make support