From: Tino Schwarze <postgresql@tisc.de>
To: pgsql-admin@postgresql.org
Subject: Re: performance on selecting a row in large tables
Date: Mon, 4 Feb 2008 22:20:50 +0100
Message-ID: <20080204212050.GA17045@easy2.in-chemnitz.de> (raw)
In-Reply-To: <12B8F225666F99489CEFA8B3F261540CFAAE10@geneva.local.terralink>
References: <12B8F225666F99489CEFA8B3F261540CFAAE10@geneva.local.terralink>
Hi Rainer,
On Tue, Feb 05, 2008 at 09:07:26AM +1300, Rainer Spittel wrote:
> When performing a 'select col01_id from table limit 1 offset 100000;',
As Tom already stated, the result of this query is a bit random since
there is no ordering at all. What are you actually querying for?
Try tuning queries before tuning the server.
> Looking forward for any comments or suggestions.
Here it is, right at the bottom of your mail:
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
explain analyze select col01_id from table limit 1 offset 100000;
will run the query and show you how the query plan looks and how much
time is spent. It is likely to say "SeqScan" somewhere - a sequential
scan of the tabe.
HTH!
Tino.
--
www.craniosacralzentrum.de
www.spiritualdesign-chemnitz.de
Tino Schwarze * Lortzingstraße 21 * 09119 Chemnitz
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: postgresql@tisc.de
Subject: Re: performance on selecting a row in large tables
In-Reply-To: <20080204212050.GA17045@easy2.in-chemnitz.de>
* 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