Re: query not using index for descending records? - Mailing list pgsql-sql

From email lists
Subject Re: query not using index for descending records?
Date
Msg-id 035C9F7CE28601428BBB5B051C9F77F207678A@orion
Whole thread Raw
In response to query not using index for descending records?  ("email lists" <lists@darrenmackay.com>)
List 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


pgsql-sql by date:

Previous
From: mohan@physics.gmu.edu
Date:
Subject: PROBLEM SOLVEDRe: java.lang.StringIndexOutOfBoundsException: String index
Next
From: beyaRecords - The home Urban music
Date:
Subject: Mechanics of Update:Cascade