X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 85ED4528C0 for ; Wed, 18 May 2005 10:35:03 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93679-10 for ; Wed, 18 May 2005 13:35:02 +0000 (GMT) Received: from mail.deg.cc (mail.deg.cc [64.139.134.201]) by svr1.postgresql.org (Postfix) with ESMTP id 9FB6B528AA for ; Wed, 18 May 2005 10:35:00 -0300 (ADT) Received: from deg.cc (unknown [205.242.255.66]) by mail.deg.cc (Postfix) with ESMTP id AAE4855FC3 for ; Wed, 18 May 2005 09:35:01 -0400 (EDT) Message-ID: <428B4487.8010702@deg.cc> Date: Wed, 18 May 2005 09:35:03 -0400 From: Pallav Kalva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: SQL logging (log_min_duration_statement) not working properly Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.027 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200505/233 X-Sequence-Number: 17662 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