Hi, 

I'm not sure if you are aware, but there is already a tool to do this, based
on the p6spy jdbc driver.
It's available under the Apache license too.

I believe the only thing it doesn't do is the analysis of the data to
suggest indices.

http://www.irongrid.com/catalog/product_info.php?products_id=32

I've only glanced at the tool, not used it.

Even if that tool is not what you want, it's probably better to extend the
p6spy driver  to do what you want - as it would be applicable across all
environments that use jdbc

Cheers,

Charles.


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 03 March 2004 08:32
> To: [EMAIL PROTECTED]
> Subject: Logging SQL for automatic index generation or performance
> Analysation ?
> 
> 
> Hi,
> 
> I would like to know where the best place would be to hook 
> into ojb a class
> which logs all sql statements sent to the DB.
> 
> My idea is to analyze the from and where clause and log into 
> a database
> table the actual statements used in a live system. I then 
> would like to
> write a tool which analyzes this table and suggests the 
> "best" indices to
> create on the database.
> 
> To make sure I really catch all statements I would like to 
> directly hook
> into ojb. Also, this could then easily be re-used.
> 
> We thought about a trace but the amount of data just seems to big.
> 
> Any ideas / suggestions ?
> 
> Thanks,
>   Stefan Schl�sser
> 
> 
> --------------------------------------------------------------
> -----------
> 
> I N T E R M E D I A T E GmbH & Co. KG
> eSolutions & Integration
> 
> Durmersheimer Stra�e 55     t +49 (0)721.98644-50
> 76185 Karlsruhe             f +49 (0)721.98644-99
> http://www.intermediate.de
> 
> P.S. Als Beratungs- und Systemhaus optimiert Intermediate die
> Gesch�ftsprozesse mittelst�ndischer Unternehmen in Vertrieb,
> Marketing und Kundenservice.
> T�tigkeitsschwerpunkte sind Angebots- und Produkt-Konfiguration
> sowie Enterprise Content-Management-Systeme.
> Unsere besondere St�rke liegt in der Integration bestehender
> Systeme, insbesondere von ERP-Systemen wie SAP R/3, BRAIN AS,
> MAS90 etc.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


___________________________________________________________
HPD Software Ltd. - Helping Business Finance Business
Email terms and conditions: www.hpdsoftware.com/disclaimer 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to