Re: Logging query plan for queries

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Himanshu Baweja <himanshubaweja(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Logging query plan for queries
Date: 2005-06-07 14:50:20
Message-ID: 200506071450.j57EoK707203@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Himanshu Baweja wrote:
>
> --- Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> > > is it possible to log plans for only the queries
> > whose
> > > duration was more than a particular value or
> > something
> > > like that... (e.g. log_min_duration_statement)....
> >
> > Sure, see log_min_duration_statement.
>
> i think bruce u got my question wrong...
> log_min_duration_statement will log only the queries
> which are longer than a particular value... and if i
> turn debug_print_plan.... it will log plans for all
> the queries irrespective of the value of
> log_min_duration_statement...
> that is wht my testing says....
>
> plz point out if i am wrong...
> and also... is there any way of logging plans for only
> a part of queries which satisfy a particular duration
> criteria...

Oh, log _plans_ for queries over a certain duration --- we don't have
any way to support that, sorry. In fact, at plan time we don't even
know how long it will take for the query to run.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-06-07 14:54:40 Re: CHAR LIKE VARCHAR
Previous Message Don Isgitt 2005-06-07 14:41:45 Update sql question