Re: index scan with index cond on first column doesn't recognize sort order of second column - Mailing list pgsql-general

From Tom Lane
Subject Re: index scan with index cond on first column doesn't recognize sort order of second column
Date
Msg-id 1915.1045178941@sss.pgh.pa.us
Whole thread Raw
In response to Re: index scan with index cond on first column doesn't recognize sort order of second column  (Greg Stark <gsstark@mit.edu>)
Responses Re: index scan with index cond on first column doesn't recognize sort order of second column
List pgsql-general
Greg Stark <gsstark@mit.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

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: 'Universal' schedule table defintion
Next
From: Tom Lane
Date:
Subject: Re: set returning functions in v7.3