Skip site navigation (1) Skip section navigation (2)

Re: Tracing SQL statements per page/request

From: Thomas Markus <t(dot)markus(at)proventis(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Tracing SQL statements per page/request
Date: 2008-08-22 11:12:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

better use log4j instead of hibernate.show_sql so you can log to a 
different logger (fi file).
activate debug for category org.hibernate.SQL to show sql statements and 
org.hibernate.type for binded parameters.


Shahaf Abileah schrieb:
> Using hibernate.show_sql sounds like a reasonable idea.  I've used this
> option to display the SQL in standard out before.  Is there a way to
> pipe that output into a different logger (e.g. an in-memory logger that
> is specific to the current request)?  Also, I've noticed that the
> hibernate.show_sql option doesn't display the parameter *values*;
> instead, it has a bunch of '?' to represent the real values (which, I
> presume, are substituted somewhere along the way).  Is there a way to
> configure hibernate logging to log the statement with real values
> instead of placeholders?
> Thanks!
> --S
> -----Original Message-----
> From: Guillaume Cottenceau [mailto:gc(at)mnc(dot)ch] 
> Sent: Thursday, August 21, 2008 2:29 AM
> To: Shahaf Abileah
> Cc: pgsql-jdbc(at)postgresql(dot)org
> Subject: Re: [JDBC] Tracing SQL statements per page/request
> Shahaf Abileah <shahaf 'at'> writes:
>> If not, can someone recommend another approach?  In case it helps, we
> use
>> hibernate as our O-R mapping so hibernate is responsible for
> generating most
>> (not all) of our SQL queries (some are still issued by direct SQL).
> Also, we
> in pg is a good idea, as already suggested, but if many other
> unrelated clients also access pg and thus it's difficult to
> isolate the queries you're interested in, why not
> hibernate.show_sql + appropriate logging on your direct SQL
> layer?

Attachment: t_markus.vcf
Description: text/x-vcard (255 bytes)

In response to

pgsql-jdbc by date

Next:From: Daniele DepetriniDate: 2008-08-22 12:11:29
Subject: Re: Pooled connections idle timeout
Previous:From: MatDate: 2008-08-22 08:36:54
Subject: Error selecting constant

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group