Re: index scan with index cond on first column doesn't recognize sort order of second column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: index scan with index cond on first column doesn't recognize sort order of second column
Date: 2003-02-14 04:45:29
Message-ID: 4169.1045197929@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> Actually you are barking up the wrong tree entirely; I'm pretty certain
>> that truncate_useless_pathkeys *doesn't* remove this pathkey, because it
>> should notice that it is relevant to the mergejoin condition.

> No, truncate_useless_pathkeys actually returns NULL.

Mmm, you're right. It would accept the second pathkey if it got to
it --- but it doesn't, because the first pathkey (col1) isn't useful
for any merge condition.

Still, truncate_useless_pathkeys isn't the place to be dealing with this
issue. It's not in a position to generate multiple interpretations of
the same path, which is what we are really after here.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nicolas Boretos 2003-02-14 07:36:53 Re: pgtcl way of specifying a user
Previous Message Tom Lane 2003-02-14 04:32:42 Re: index scan with index cond on first column doesn't recognize sort order of second column