Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4B42347627E for ; Tue, 17 Dec 2002 11:21:19 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 9EC8747626B for ; Tue, 17 Dec 2002 11:21:12 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 7094243A74C; Tue, 17 Dec 2002 11:21:12 -0500 (EST) From: Harald Krake X-Newsgroups: comp.databases.postgresql.admin Subject: Re: order by has no effect in index-choose? Date: Tue, 17 Dec 2002 17:21:17 +0100 Organization: Krake Softwaretechnik Lines: 20 Message-ID: References: <3debe38b.0212170430.24cbea8e@posting.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@news.hub.org User-Agent: KNode/0.7.1 To: pgsql-admin@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/224 X-Sequence-Number: 6719 Klaus Daum wrote: > i have: > > create table t (id int, s1 text, s2 text); > create index s1 on t using (id, s1); > create index s2 on t using (id, s2); > > [fill table t, analyse table t] > > select * from t where id=1 order by s1; > > -> is using index s2 select * from t where id=1 order by id,s1 will use s1.