Re: more anti-postgresql FUD

From: "Karen Hill" <karen_hill22(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: more anti-postgresql FUD
Date: 2006-10-17 20:37:06
Message-ID: 1161117426.110586.277100@m73g2000cwd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


"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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-10-17 20:43:41 Re: more anti-postgresql FUD
Previous Message Jorge Godoy 2006-10-17 20:15:13 Re: Database users Passwords

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Woodward 2006-10-17 20:42:58 Re: Syntax bug? Group by?
Previous Message Joe Sunday 2006-10-17 20:26:44 Re: Syntax bug? Group by?