Re: Get more from indices.

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Get more from indices.
Date: 2014-04-11 02:38:01
Message-ID: 53475589.2060905@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/04/10 22:25), Tom Lane wrote:
> Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> writes:
>> (2014/04/10 0:08), Tom Lane wrote:
>>> TBH I think that's barely the tip of the iceberg of cases where this
>>> patch will get the wrong answer.
>
>>> Also, I don't see it doing anything to check the ordering
>>> of multiple index columns
>
>> I think that the following code in index_pathkeys_are_extensible() would
>> check the ordering:
>> + if (!pathkeys_contained_in(pathkeys, root->query_pathkeys))
>> + return false;
>
> Hm ... if you're relying on that, then what's the point of the new loop
> at all?

The point is that from the discussion [1], we allow the index pathkeys
to be extended to query_pathkeys if each *remaining* pathkey in
query_pathkey is a Var belonging to the indexed relation. The code is
confusing, though. Sorry, that is my faults.

Thanks,

[1] http://www.postgresql.org/message-id/29637.1389064686@sss.pgh.pa.us

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-04-11 03:04:10 Re: WIP patch (v2) for updatable security barrier views
Previous Message Haribabu Kommi 2014-04-11 02:32:06 Re: PostgreSQL in Windows console and Ctrl-C