pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Harald Krake <harald@krake.de>
To: pgsql-admin@postgresql.org
Subject: Re: order by has no effect in index-choose?
Date: Tue, 17 Dec 2002 17:21:17 +0100
Message-ID: <atnito$2hlh$1@news.hub.org> (raw)
References: <3debe38b.0212170430.24cbea8e@posting.google.com>

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.






Message-ID: <atnito$2hlh$1@news.hub.org>
Permalink:  ../atnito$2hlh$1@news.hub.org/
Also on:    postgresql.org/message-id/atnito$2hlh$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: harald@krake.de
  Subject: Re: order by has no effect in index-choose?
  In-Reply-To: <atnito$2hlh$1@news.hub.org>
  References: <3debe38b.0212170430.24cbea8e@posting.google.com> <atnito$2hlh$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox