From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Laszlo Nagy <gandalf@shopzeus.com>
Cc: Florian Weimer <fweimer@bfk.de>
Cc: Daniel Fekete <danieleff@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Slow query + why bitmap index scan??
Date: Wed, 12 Jan 2011 10:31:50 -0600
Message-ID: <4D2D8316020000250003933F@gw.wicourts.gov> (raw)
In-Reply-To: <4D2DC6BA.3000400@shopzeus.com>
References: <4D2D9B1E.7080302@shopzeus.com>
<82y66qp7al.fsf@mid.bfk.de>
<4D2DB8F9.9050609@shopzeus.com>
<4D2D68270200002500039327@gw.wicourts.gov>
<4D2DC6BA.3000400@shopzeus.com>
Laszlo Nagy <gandalf@shopzeus.com> wrote:
>> In addition to the good advice from Ken, I suggest that you set
>> effective_cache_size (if you haven't already). Add whatever the
>> OS shows as RAM used for cache to the shared_mem setting.
> It was 1GB. Now I changed to 2GB. Although the OS shows 9GB
> inactive memory, we have many concurrent connections to the
> database server. I hope it is okay to use 2GB.
effective_cache_size doesn't cause any RAM to be allocated, it's
just a hint to the costing routines. Higher values tend to favor
index use, while lower values tend to favor sequential scans. I
suppose that if you regularly have many large queries running at the
same moment you might not want to set it to the full amount of cache
space available, but I've usually had good luck setting to the sum
of shared_buffers space and OS cache.
Since it only affects plan choice, not memory allocations, changing
it won't help if good plans are already being chosen.
-Kevin
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, gandalf@shopzeus.com, fweimer@bfk.de, danieleff@gmail.com
Subject: Re: Slow query + why bitmap index scan??
In-Reply-To: <4D2D8316020000250003933F@gw.wicourts.gov>
References: <4D2D9B1E.7080302@shopzeus.com> <82y66qp7al.fsf@mid.bfk.de> <4D2DB8F9.9050609@shopzeus.com> <4D2D68270200002500039327@gw.wicourts.gov> <4D2DC6BA.3000400@shopzeus.com> <4D2D8316020000250003933F@gw.wicourts.gov>
* 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