SQL logging (log_min_duration_statement) not working properly

From: Pallav Kalva <pkalva(at)deg(dot)cc>
To: pgsql-admin(at)postgresql(dot)org
Subject: SQL logging (log_min_duration_statement) not working properly
Date: 2005-05-18 13:35:03
Message-ID: 428B4487.8010702@deg.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Everybody,

I am having problems with logging long running SQL in the log file.
I have set log_min_duration_statement = 5000 (5secs) and it is not
logging sql statements that took over 5 secs and this is only from
queries generated by Hibernate . here is a sample query from hibernate :

-----------------------------------------------------------------------------------------
select listingadd1_.addressid as col_0_0_
from listing.listing listing0_, listing.address listingadd1_
where ((select count(taxrolls2_.fkaddressid)
from listing.taxroll taxrolls2_
where listingadd1_.addressid=taxrolls2_.fkaddressid)=0 )
and(listing0_.fkbestaddressid=listingadd1_.addressid )
and(listing0_.entrydate>$1 )
order by listingadd1_.addressid asc
--------------------------------------------------------------------------------------------

This above query take more than 5 secs to run and it wont get logged ,
where as all other queries which are not generated by Hibernate are
logged. Is this expected behavior ? am I missing something else ?
Please advice.

Thanks!
Pallav

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message KÖPFERL Robert 2005-05-18 14:32:34 Re: database A to database B
Previous Message Ing. Jhon Carrillo 2005-05-18 13:27:45 database A to database B