On 1 Jul 2003 at 15:50, Howard Oblowitz wrote:
> The documentation says that Effective Cache Size "sets the optimizer's
> assumption
> about the effective size of the disk cache ( that is, the portion of the
> kernel's disk
> cache that will be used for PostgreSQL data files ).
>
> What then will be the effect of setting this too high?
>
> And too low?
Let's say postgresql is preparing a plan for a scan and it estimates data set
size as 100MB whereas your shared buffers+effective cache is 80M. So postgresql
would deduce that it would be better off with sequential scan rather than index
scan. Where in fact you have much more memory to make a file system cache and
the machine can afford index scan.
There is nothing too low or too high of a setting. This isn't exactly
performance tuning paramter as other. This is more of information to
postgresql. The closer it gets to truer, the plans produced would get optimal.
About how to set this parameter, it is roughly
effective cache size= (Physical RAM size-shared buffers-requirement for other
apps) * 0.8
This is very very rough. You need to make sure that some setting does not
trigger a swap avelanche
HTH
Bye
Shridhar
--
Slous' Contention: If you do a job too well, you'll get stuck with it.