From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Palle Girgensohn <girgen(at)pingpong(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: prepared statements don't log arguments? |
Date: | 2005-04-08 06:49:03 |
Message-ID: | 1112942943.16721.1178.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2005-04-08 at 00:51 +0200, Palle Girgensohn wrote:
> --On torsdag, april 07, 2005 23.31.52 +0100 Simon Riggs
> <simon(at)2ndquadrant(dot)com> wrote:
>
> > On Wed, 2005-04-06 at 15:01 +0200, Palle Girgensohn wrote:
> >> I really need to know the *real* arguments...
> >
> > Why do you need to log the arguments as well?
>
> Debugging purposes. If I fealize there are queries hogging the server, I'd
> like to get them from a log so I can tune the system, maybe add an index or
> find the qurey in the src code an rephrase it. It is *very* helpful to a
> proper set of arguments for a slow query, since another set of arguments
> will probably give a very speedy result. I need to find the hogs, basically.
OK, thats what I hoped you'd say. With a prepared query all of the
statements execute the same plan, so you don't need to know the exact
parameters. Before v3 the whole query was logged because the statements
were not prepared and each query might have been different. That is no
longer the case.
ISTM that for analysis purposes it is helpful to know that a particular
query is being repeated. Also, if you log the actual parameters, the log
gets unusefully large very quickly.
Anyway, I have a patch that I will be able to submit shortly in this
area. No doubt it will require further discussion.
Best Regards, Simon Riggs
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-04-08 06:57:32 | Re: prepared statements don't log arguments? |
Previous Message | Qingqing Zhou | 2005-04-08 05:36:40 | Re: Compressing WAL |