db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Statistical Information of overall queries
Date Mon, 09 Jun 2008 13:03:18 GMT
Hi Mahmoud,

Some of the information you need can be obtained by setting a tracing 
property when you bring up the Derby engine. Please see the section 
titled "derby.language.logStatementText" in the Derby Tuning Guide: 
http://db.apache.org/derby/docs/10.4/tuning/ Setting this property will 
cause Derby to log each executed statement along with timestamp and 
other information. The information will be written to derby.log.

You can then aggregate those log records. If I were tackling this 
problem myself, I would be tempted to write a simple table function to 
parse the log records into timestamp and text columns and then slice and 
dice the log using SQL. For an example of how to do this, please take a 
look at the demo directory tree in your 10.4 distribution. In the vtis 
subtree, you will find a log-reading table function called 
SubversionLogVTI. The demoFileVtis.sql script shows you how to run SQL 
against a log-reading table function like this.

Hope this helps,
-Rick

mah_habbal wrote:
> Hi, 
> I am using Hibernate to manage my derby database but I don’t know how to got
> statistical information about my database, like how many SQL query my
> application is hitting db or how many insert in “a minute” for a particular
> table, how many time specific SQL  query executed in “an hour”.
> My question is related to overall statistical info, now I don’t care about
> info of individual query which I found via calling procedure 
>
> VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()
>
> If anyone can help me and tell me if derby and/or hibernate can give those
> information 
>
> Thanks 
> Mahmoud,
>   


Mime
View raw message