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

Поиск
Список
Период
Сортировка
От Alain TESIO
Тема Re: [SQL] query to do a backward 'skip', possible with (index) optimization ?
Дата
Msg-id 20000110191406.1987.qmail@web302.mail.yahoo.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Jude Weaver
Дата:
Сообщение: Simmultanous Connections
Следующее
От: Werner Fraga
Дата:
Сообщение: problems creating functions, triggers, and rules