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

Re: plan time of MASSIVE partitioning ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
Cc: 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-10-29 20:23:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-10-29 20:28:11
Subject: Re: crash in plancache with subtransactions
Previous:From: Alvaro HerreraDate: 2010-10-29 20:11:18
Subject: Re: [PATCH] Cleanup: Compare pointers to NULL instead of 0

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