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
Firstly - if you don't know about the tuning guidelines/annotated config file,
you should go here:
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
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.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]