Re: [SQL] query to do a backward 'skip', possible with (index) optimization ? - Mailing list pgsql-sql

From Alain TESIO
Subject Re: [SQL] query to do a backward 'skip', possible with (index) optimization ?
Date
Msg-id 20000110191406.1987.qmail@web302.mail.yahoo.com
Whole thread Raw
List pgsql-sql
> > => select * from mytable where id 
> < '12345' order by id desc limit 1;
> 
> > - which returned the correct 
> result '12344', but without optimization.

Just an idea : add another column
negative_id which is equal to -id and
reverse the test ...

Alain

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


pgsql-sql by date:

Previous
From: Jude Weaver
Date:
Subject: Simmultanous Connections
Next
From: Werner Fraga
Date:
Subject: problems creating functions, triggers, and rules