From: Luke Lonergan <llonergan@greenplum.com>
To: Mark Dobbrow <mdobbrow@yahoo.com>
To: pgsql-performance@postgresql.org
Subject: Re: Large table performance
Date: Sun, 14 Jan 2007 11:02:24 -0800
Message-ID: <C1CFBE40.1805B%llonergan@greenplum.com> (raw)
In-Reply-To: <376735.48483.qm@web35309.mail.mud.yahoo.com>
Mark,
This behavior likely depends on how the data is loaded into the DBMS. If
the records you are fetching are distributed widely among the 3M records on
disk, then
On 1/12/07 4:31 PM, "Mark Dobbrow" <mdobbrow@yahoo.com> wrote:
> Hello -
>
> I have a fairly large table (3 million records), and am fetching 10,000
> non-contigous records doing a simple select on an indexed column ie
>
> select grades from large_table where teacher_id = X
>
> This is a test database, so the number of records is always 10,000 and i have
> 300 different teacher ids.
>
> The problem is, sometimes fetching un-cached records takes 0.5 secs and
> sometimes (more often) is takes more like 10.0 seconds
>
> (fetching the same records for a given teacher_id a second time takes about
> 0.25 secs)
>
> Has anyone seen similar behavior or know what the solution might be?
>
> any help much appreciated,
> Mark
>
>
>
> ps. My shared_buffers is set at 5000 (kernal max), and work_mem=8192
>
>
>
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-performance@postgresql.org
Cc: llonergan@greenplum.com, mdobbrow@yahoo.com
Subject: Re: Large table performance
In-Reply-To: <C1CFBE40.1805B%llonergan@greenplum.com>
* 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