Re: Logging long queries: not all get logged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ogjunk-pgjedan@xxxxxxxxx writes:
> Hi,
>
> I'm running PG 8.0.3.  I'm trying to catch slow queries, so I have this in postgresql.conf:
>
>   # log queries that take more than 500 ms
>   log_min_duration_statement = 500       # in ms
>
> This does log _some_ queries that take > 500 ms to run.
> However, it looks like not all queries get logged!
>
> And I think I spotted a pattern:
>
> Queries that DO get logged are:
>   - queries run using psql
>   - queries run by the java app that uses JDBC to talk to my PG database
>
> Queries that do NOT get logged are:
>   - queries run by the java app that uses Hibernate to talk to my PG database

We occasionally have run into seemingly the same issue.

Question:

Are you certain that the queries are taking longer than 500ms for
PostgreSQL to process them?

Or are you merely certain that Hibernate is reporting that it took
longer than that for *it* to process them?

We have had Java applications which would report spurious "slow"
queries any time the garbage collector had to do any significant
amount of work.

It could be that the garbage collector is causing Hibernate to stall
while processing its logging, thereby incorrectly reporting that
database queries are running slow...
-- 
(reverse (concatenate 'string "gro.gultn" "@" "enworbbc"))
http://cbbrowne.com/info/finances.html
The only problem
with Haiku is that you just
get started and then 


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux