From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Childs <blue(dot)dragon(at)blueyonder(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Logging of queryies |
Date: | 2003-01-26 20:14:42 |
Message-ID: | 200301262014.h0QKEgI05060@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I assume you are using log_duration. Yes, that does produce quite a bit
of output. In fact, you need log_statement and log_pid at the same time
so you can figure out the query that had that duration, and that can
really fill the logs.
We could change log_duration to take a time in milliseconds rather than
just be a boolean, and print the duration _only_ if it was longer than
the specified number of milliseconds. Not sure what value we would use
to have it always print the duration, assuming 0 means off, or if we use
0 for always print, that values would we use for off, -1?
Another feature would be to print the query if log_statement was not
already true. How does that sound?
---------------------------------------------------------------------------
Peter Childs wrote:
> After listening to a long talk on the glories of MySql (Its no
> better than Postgres, Postgres can do things MySql can't do and MySql can
> do things Postgres can't do... So I'm not going to change camp) but it is
> a good idea to know what the other camp thinks.
> One nice feature that was meationed was the ability to log queries
> by how long they took, I'm already loggin all my queries but this produces
> alot of junk. Is it possible to just log all the queries that take longer
> than say 30secs so I can then work on those that really take ages to speed
> my program up.
>
> Thanks in advance.
>
> Peter Childs
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-01-26 22:00:36 | Re: I was spoiled by the MySQL timestamp field |
Previous Message | Matthew Nuzum | 2003-01-26 20:04:12 | Re: I was spoiled by the MySQL timestamp field |