Re: query not using index for descending records?

From: "email lists" <lists(at)darrenmackay(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: query not using index for descending records?
Date: 2004-01-31 05:09:15
Message-ID: 035C9F7CE28601428BBB5B051C9F77F207678A@orion
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Browse pgsql-sql by date

  From Date Subject
Next Message beyaNet Consultancy 2004-01-31 10:45:26 Mechanics of UpDate:Cascade
Previous Message mohan 2004-01-30 16:04:21 PROBLEM SOLVEDRe: java.lang.StringIndexOutOfBoundsException: String index