Re: Auto-explain patch
Re: Auto-explain patch
Here is an updated version of the patch, with a debug_explain_min_duration parameter to allow explaining of just slow-running queries. I've also incorporated a couple of Simon Riggs' suggestions for formatting the output better. Do I need to post this to -patches, or is that now obsolete? Regards, Dean ---------------------------------------- > From: dean_rasheed@hotmail.com > To: badalex@gmail.com > CC: pgsql-hackers@postgresql.org > Subject: RE: [HACKERS] Auto-explain patch > Date: Wed, 2 Jul 2008 19:42:06 +0000 > > >> Its certainly not useful to *me* in its current form. It would >> produce way to much (usless) output. However if it were tied to >> log_min_duration_statement so I get auto explains for long running >> queries... That would be very useful indeed. Even if it has to >> explain everything just to toss out the explain if it did not meet >> log_min_duration_statement. Unless I missed something and thats >> exactly what it does? > > Thanks for the feedback. I agree, it does need a way to limit the > output, and target just the slow-running queries. > > I also remember now the problem I had last time:- since this debug > output is produced at a lower level than the other statement logging > (so it can explain *all* SQL executed, not just top-level statements), it > is difficult to control using the normal statement logging parameters. > > It would be easy to add another parameter, debug_explain_min_duration, > specific to this option, to limit it to slow low-level queries. > > This would allow setting debug_explain_min_duration to be smaller than > log_min_duration_statement, which makes sense, since the latter > controls logging of top-level statements which may result in multiple > low-level queries. > > Doing it this way would mean instrumenting all queries, but only > explaining the slow ones, when debug_explain_plan is on. > I'll have a play and see how it goes... > > Regards, Dean > > _________________________________________________________________ > Live Search Charades - guess correctly and find hidden videos > http://www.searchcharades.com/ _________________________________________________________________ The next generation of Windows Live is here http://www.windowslive.co.uk/get-live
Re: Auto-explain patch
От:
"Alex Hunsaker" <badalex@gmail.com>
Дата:
On Thu, Jul 3, 2008 at 10:58 AM, Dean Rasheed wrote: > > Here is an updated version of the patch, with a debug_explain_min_duration > parameter to allow explaining of just slow-running queries. I've also incorporated > a couple of Simon Riggs' suggestions for formatting the output better. > > Do I need to post this to -patches, or is that now obsolete? Yes its obsolete now, instead add it to July's commit fest at http://wiki.postgresql.org/wiki/CommitFest:July.
Re: Auto-explain patch
От:
Simon Riggs <simon@2ndquadrant.com>
Дата:
On Thu, 2008-07-03 at 16:58 +0000, Dean Rasheed wrote: > Here is an updated version of the patch Dean, I'm getting 4 chunks fail when trying to apply your patch onto CVS HEAD. I'm sure its just a little bitrot. Can you update the patch please? Thanks, -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support