views:

8

answers:

1

For optimization purposes, I would like to collect statistics about data usage in an enterprise Java application. In practise, I would like to know which database tables, and moreover, which individual records are accessed most frequently.

What I thought I could do is write an aspect that records all data access and asynchronously writes the results to a database but I feel that I would be re-inventing the wheel by doing so. So, are there any existing open source frameworks that already tackle this problem or is it somehow possible to squeeze this information directly from MySQL?

A: 

This might be useful - have you seen the UserTableMonitoring project?

JoseK
It looks useful but I ended up taking the re-invent-wheel-approach and wrote an aspect for the job. This way I'm actually able to gather more information than with a database based solution because I'm also able to access the HttpServletRequest object.
Muton