[postgis-users] Postgres Tuning - Actual Results

Stephen Frost sfrost at snowman.net
Thu Feb 3 09:43:37 PST 2011


Brian,

* Brian Hamlin (maplabs at light42.com) wrote:
> I am guessing that work_mem is the wildcard that is causing the
> large allocations..
> Comments / Suggestions on this ?

Yes, work_mem is used to determine, for each sort/hash/etc, if it
should be done in-memory or done on disk.  If you have a huge query,
with many sorts/hashes/etc, a single query could use much more than the
value of work_mem.

If you reduce work_mem, PG will try to find another plan where each
sort/hash/etc fits within that constraint, which may mean some spilling
to disk and/or overall change in the plan.

	Thanks,

		Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110203/f6c289ba/attachment.pgp>


More information about the postgis-users mailing list