Re: more anti-postgresql FUD

Поиск
Список
Период
Сортировка
От Karen Hill
Тема Re: more anti-postgresql FUD
Дата
Msg-id 1161117426.110586.277100@m73g2000cwd.googlegroups.com
обсуждение исходный текст
Ответ на Re: more anti-postgresql FUD  ("Merlin Moncure" <mmoncure@gmail.com>)
Ответы Re: more anti-postgresql FUD  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
"Merlin Moncure" wrote:

> >     SELECT * FROM TABLE ORDER BY pk LIMIT 10 OFFSET N;
>
> using offset to walk a table is extremely poor form because of:
> * poor performance
> * single user mentality
> * flat file mentality
>
> databases are lousy at this becuase they inheritly do not support
> abolute addressing of data -- nore should they, beause this is not
> what sql is all about.  in short, 'offset' is a hack, albeit a useful
> one in some cases, but dont gripe when it doesn't deliver the goods.
>
> for server side browsing use cursors or a hybrid pl/pgqsl loop. for
> client side, browse fetching relative to the last key:
>
> select * from foo where p > p1 order by p limit k;
>
> in 8.2, we get proper comparisons so you can do this with multiple part keys:
>
> select * from foo where (a1,b1,b1) > (a,b,c) order by a,b,c limit k;
>

I have 8.2 Beta 1 (Win32) on my home pc  and offset was faster than
fetching relative to the last key as measured by explain analyze.  This
was on a table with about 1,000 rows.

regards,

karen


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

Предыдущее
От: Jorge Godoy
Дата:
Сообщение: Re: Database users Passwords
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: more anti-postgresql FUD