From: email lists <lists@darrenmackay.com>
To: pgsql-sql@postgresql.org
Subject: Re: query not using index for descending records?
Date: Sat, 31 Jan 2004 15:09:15 +1000
Message-ID: <035C9F7CE28601428BBB5B051C9F77F207678A@orion> (raw)
Hi,
| You probably don't want to do that. The DESC only applies to the
| one expression it follows. What you want is probably:
| explain select datetime,id from trafficlogs order by
| datetime desc,id desc limit 20;
This is exactly what I was after - worked a treat!
Thanks.
Darren
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lists@darrenmackay.com
Subject: Re: query not using index for descending records?
In-Reply-To: <035C9F7CE28601428BBB5B051C9F77F207678A@orion>
* 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