Re: performance on selecting a row in large tables - Mailing list pgsql-admin

From Tom Lane
Subject Re: performance on selecting a row in large tables
Date
Msg-id 7905.1202157565@sss.pgh.pa.us
Whole thread Raw
In response to performance on selecting a row in large tables  ("Rainer Spittel" <rainer.spittel@terralink.co.nz>)
List pgsql-admin
"Rainer Spittel" <rainer.spittel@terralink.co.nz> writes:
> When performing a 'select col01_id from table limit 1 offset 100000;',
> the query takes up to 20sec. Monitoring the dstats on the server, I see
> that the box is reading approx. 1GB from the disks.

No surprise.  That query says "read 100001 rows, then throw away the
first 100000".

Why are you considering that this is an important performance measure?
Are you aware that the results of such a query aren't even very well
defined (since you omitted an ORDER BY)?

            regards, tom lane

pgsql-admin by date:

Previous
From: "Rainer Spittel"
Date:
Subject: performance on selecting a row in large tables
Next
From: Tino Schwarze
Date:
Subject: Re: performance on selecting a row in large tables