X-Original-To: pgsql-general@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 39B4F474E4F for ; Thu, 13 Feb 2003 18:29:02 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 84116474E42 for ; Thu, 13 Feb 2003 18:29:01 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1DNT15u001916; Thu, 13 Feb 2003 18:29:02 -0500 (EST) To: Greg Stark Cc: Stephan Szabo , pgsql-general@postgresql.org Subject: Re: index scan with index cond on first column doesn't recognize sort order of second column In-reply-to: <87u1f7kf1y.fsf@stark.dyndns.tv> References: <20030213113156.T47380-100000@megazone23.bigpanda.com> <87u1f7kf1y.fsf@stark.dyndns.tv> Comments: In-reply-to Greg Stark message dated "13 Feb 2003 17:10:17 -0500" Date: Thu, 13 Feb 2003 18:29:01 -0500 Message-ID: <1915.1045178941@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/748 X-Sequence-Number: 37502 Greg Stark 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