Re: Tracing SQL statements per page/request - Mailing list pgsql-jdbc

From Shahaf Abileah
Subject Re: Tracing SQL statements per page/request
Date
Msg-id 082D8A131DF72A4D88C908A1AD3DEB2204A92BA3@mail-1.rf.lan
Whole thread Raw
In response to Re: Tracing SQL statements per page/request  (Guillaume Cottenceau <gc@mnc.ch>)
Responses Re: Tracing SQL statements per page/request  (Thomas Markus <t.markus@proventis.net>)
List pgsql-jdbc
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@mnc.ch]
Sent: Thursday, August 21, 2008 2:29 AM
To: Shahaf Abileah
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Tracing SQL statements per page/request

Shahaf Abileah <shahaf 'at' redfin.com> 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?

--
Guillaume Cottenceau, MNC Mobile News Channel SA, an Alcatel-Lucent
Company
Av. de la Gare 10, 1003 Lausanne, Switzerland - direct +41 21 317 50 36



pgsql-jdbc by date:

Previous
From: Shahaf Abileah
Date:
Subject: Re: Tracing SQL statements per page/request
Next
From: Thomas Markus
Date:
Subject: Re: Tracing SQL statements per page/request