From: Richard Huxton <dev@archonet.com>
To: David Hill <davidh@wmis.net>
To: pgsql-performance@postgresql.org
Subject: Re: freebsd 5.2 and max_connections
Date: Tue, 13 Jan 2004 17:13:42 +0000
Message-ID: <200401131713.42682.dev@archonet.com> (raw)
In-Reply-To: <20040113160413.GB1554@phobia.ms>
References: <20040113160413.GB1554@phobia.ms>
On Tuesday 13 January 2004 16:04, David Hill wrote:
> Hello -
> I am using postgresql to hold aliases, users, and relay_domains for postfix
> and courier to do lookups from. I am not storing mail in sql.
>
> I need postgresql to have fast read performance, so i setup index's on the
> tables. Also, the queries are basically "select blah from table where
> domain='domain.com'";, so i dont need to be able to support large results.
>
> I will have a lot of mail servers connecting to this postgresql db, so i
> need to support a lot of connections... but dont need to support large
> results.
Firstly - if you don't know about the tuning guidelines/annotated config file,
you should go here:
http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php
Hmm - small result sets accessed directly via indexed fields, so sort_mem
probably isn't important to you.
Make sure your effective cache setting is accurate though, so PG can estimate
whether it'll need to access the disks.
Not sure if clustering one or more tables will help - I'm guessing not. What
might help is to increase the statistics gathered on important columns. That
should give the planner a more accurate estimate of value distribution and
shouldn't cost you too much to keep accurate, since I'm guessing a low rate
of updating.
You might want to play with the random page cost (?or is it random access
cost?) but more RAM for a bigger disk cache is probably the simplest tweak.
--
Richard Huxton
Archonet Ltd
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: dev@archonet.com, davidh@wmis.net
Subject: Re: freebsd 5.2 and max_connections
In-Reply-To: <200401131713.42682.dev@archonet.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