Re: increasing shared buffer slow downs query performance.

Lists: pgsql-performance
From: "petchimuthu lingam" <spmlingam(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: increasing shared buffer slow downs query performance.
Date: 2008-03-24 09:27:59
Message-ID: cd233fc30803240227u7507f0c7wf67bb313c61f8a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

Hi friends,

I am using postgresql 8.1, I have shared_buffers = 50000, now i execute the
query, it takes 18 seconds to do sequential scan, when i reduced to 5000, it
takes one 10 seconds, Why.

Can anyone explain what is the reason, ( any other configuration is needed
in postgresql.conf)

--
With Best Regards,
Petchimuthulingam S


From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: increasing shared buffer slow downs query performance.
Date: 2008-03-24 10:07:19
Message-ID: 20080324100718.GA7822@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

petchimuthu lingam <spmlingam(at)gmail(dot)com> schrieb:

> Hi friends,
>
> I am using postgresql 8.1, I have shared_buffers = 50000, now i execute the
> query, it takes 18 seconds to do sequential scan, when i reduced to 5000, it
> takes one 10 seconds, Why.

Wild guess: the second time the data are in the filesystem cache.

>
> Can anyone explain what is the reason, ( any other configuration is needed in
> postgresql.conf)

Show us the EXPLAIN ANALYSE - Output.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°


From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Andreas Kretschmer" <akretschmer(at)spamfence(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: increasing shared buffer slow downs query performance.
Date: 2008-03-25 12:23:58
Message-ID: 2e78013d0803250523w28a16315w3e5ec0846155c8b7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-performance

On Mon, Mar 24, 2008 at 3:37 PM, Andreas Kretschmer
<akretschmer(at)spamfence(dot)net> wrote:
> petchimuthu lingam <spmlingam(at)gmail(dot)com> schrieb:
>
>
> > Hi friends,
> >
> > I am using postgresql 8.1, I have shared_buffers = 50000, now i execute the
> > query, it takes 18 seconds to do sequential scan, when i reduced to 5000, it
> > takes one 10 seconds, Why.
>
> Wild guess: the second time the data are in the filesystem cache.
>

Another wild possibility is that the first query sets the hint bits for the
rows involved and hence the second time it runs fast. May be you want
to run the query few times in both the settings and then compare.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com