Re: Obtaining a limited number of records from a long query

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема Re: Obtaining a limited number of records from a long query
Дата
Msg-id 20090525165617.02d1658a@dawn.webthatworks.it
обсуждение исходный текст
Ответ на Re: Obtaining a limited number of records from a long query  ("Oliveiros Cristina" <oliveiros.cristina@marktest.pt>)
Список pgsql-sql
On Mon, 25 May 2009 15:20:57 +0100
"Oliveiros Cristina" <oliveiros.cristina@marktest.pt> wrote:

> Thank you for pointing it out, Ivan.
> The query I am trying to restrict output for happens to be an
> ORDER BY query.
> Actually I wasn't aware of this detail.
> I'll leave a mental note for myself that results might be
> unexpected for not ORDER BY queries

a bit more about "unexpected":

- if people insert other rows... and by chance they happen to fall before the ones you already retrieved... no matter
ofthe ORDER BY, you may "miss" them in the "paginated result".
 
- without an order by there is no "granted" order. This is not a deficiency of PostgreSQL, it is not mandated by sql
standardand it offers chances for optimisation
 

The fact that without an order by clause they may return in the same
order... is implementation dependent and Postgresql don't behave
that way or it happens just by chance.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Oliveiros Cristina"
Дата:
Сообщение: Re: Obtaining a limited number of records from a long query
Следующее
От: John Dizaro
Дата:
Сообщение: Pgadmin hotkeys?