Re: order by has no effect in index-choose?

From: Harald Krake <harald(at)krake(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: order by has no effect in index-choose?
Date: 2002-12-17 16:21:17
Message-ID: atnito$2hlh$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-12-17 16:24:20 Re: Is it harmless?
Previous Message Rajesh Kumar Mallah. 2002-12-17 15:50:17 Is it harmless?