Robert Klemme wrote:
It's probably better to benchmark the application while enabling one
of the Oracle traces during execution. You'll then get the real data
and execution plans.
And this is an even better idea than trying to rely on integration tests
(although a basic check of SQL goodness isn't a bad idea either, to be
done before things get to production).
Another idea would be to capture the inputs to a typical production
case, and add them to a performance test or stress test. Instrumenting
production systems is OK if you can do it, but I like automated,
reproducible tests better.
I just did a quick web search for SONAR. It's one of those cruddy
little "code goodness" tools, where you apparently don't trust your
programmers to write good code, or you have no control over software
quality, so instead of fixing those problems you install a tool to give
you little reports about how crappy your code is. Dear sweet Jebus on a
pogo stick.
<http://www.sonarsource.org/>
Here's an interceptor for JDBC calls. I've seen this in action and it's awesome.