Re: Using index with order desc

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Dave Smith <dave(dot)smith(at)candata(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using index with order desc
Date: 2002-07-17 12:37:14
Message-ID: m4paju4e8rvlmo6pm794co1qo2g9o08gtj@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16 Jul 2002 16:35:18 -0400, Dave Smith <dave(dot)smith(at)candata(dot)com>
wrote:
>CREATE INDEX transfer_5 on transfer(company_id,module);
>
>explain select * from transfer where company_id=1012 order by
>company_id,module desc;

Dave,
...
ORDER BY company_id DESC, module DESC
^^^^

*might* help.

Servus
Manfred

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Graulich 2002-07-17 12:40:03 Re: max() not using index
Previous Message Helge Bahmann 2002-07-17 12:36:16 Re: Using index with order desc