On 13 Nov 2002 at 8:20, Neil Conway wrote:
> "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > 3) Sort mem is a tricky affair. AFAIU, it is used only when you create index or
> > sort results of a query. If do these things seldomly, you can set this very low
> > or default. For individual session that creates index, you can set the sort
> > memory accordingly.
>
> What would the benefit of this be? sort_mem is just an upper limit on
> memory consumption, and that memory is only allocated on demand. So
> there shouldn't be a difference between setting sort_mem globally to
> some reasonable value, and manually changing it for backends that need
> to do any sorting.
Well, while that is correct, setting sort mem high only when required would
prevent memory exhaustion if that happens.
Remember he has 5000 requests per minute with concurrent connection. Now say
there is a default high setting of sort mem and a connection persist for a long
time, it *might* accumulate memory. Personally I would not keep it high by
default.
Bye
Shridhar
--
Absentee, n.: A person with an income who has had the forethought to remove
himself from the sphere of exaction. -- Ambrose Bierce, "The Devil's
Dictionary"