capturing/viewing sort_mem utilization on a per query basis - Mailing list pgsql-general

From Lonni J Friedman
Subject capturing/viewing sort_mem utilization on a per query basis
Date
Msg-id 7c1574a905020207149c41e52@mail.gmail.com
Whole thread Raw
Responses Re: capturing/viewing sort_mem utilization on a per query basis  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Greetings,
I've got a pesky J2EE based app that is using PostgreSQL-7.4.x on the
backend.  Lately i've been getting a disturbing large number of
PostgreSQL out of memory exceptions on the J2EE side when running
queries that have some huge joins in them.  I've tried increasing the
sort_mem value for the DB , but that hasn't had any noticable impact.
Rather than fumbling blindly in the dark, i'd like to get a better
idea of how much memory this query really needs.

Is there a way for me to capture that in the log?

Note, i'm not the person who wrote this app or the query, i'm just the
guy responsible for the DB.  I've already castigated the folks who
wrote this resource hog.

thanks,
Lonni

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama@gmail.com
LlamaLand                       http://netllama.linux-sxs.org

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: query time
Next
From: WireSpot
Date:
Subject: Re: query time