From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rainer Spittel <rainer.spittel@terralink.co.nz>
Cc: pgsql-admin@postgresql.org
Subject: Re: performance on selecting a row in large tables
Date: Mon, 04 Feb 2008 15:39:25 -0500
Message-ID: <7905.1202157565@sss.pgh.pa.us> (raw)
In-Reply-To: <12B8F225666F99489CEFA8B3F261540CFAAE10@geneva.local.terralink>
References: <12B8F225666F99489CEFA8B3F261540CFAAE10@geneva.local.terralink>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rainer.spittel@terralink.co.nz
Subject: Re: performance on selecting a row in large tables
In-Reply-To: <7905.1202157565@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox