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-13 23:29:01
Message-ID: 1915.1045178941@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:
> I'm not clear on what truncate_useless_pathkeys is doing.

It's throwing away pathkey info that isn't relevant for the current
query (and would cause the planner to consider a multi-column-index
scan as better-ordered than a scan of an index with fewer columns,
when no such thing is true if the extra columns aren't relevant).

> If it were changed to just keep the suffix would that break other things?

Yes, that would be completely backwards.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-14 00:01:30 Re: set returning functions in v7.3
Previous Message Dennis Gearon 2003-02-13 23:08:28 'Universal' schedule table defintion