Can there be in whatever way for all of us to question the db to point out index creation/index deletion that will enhance the performance from the db system?
We realize that a dba can by hand see the trace files to produceOrdecrease indices but could i write a java program that queries the db engine to point out exactly the same instantly.
Or some free tools will be able to check to carry out the same instantly.
Well there is no standard JDBC method of doing this. There might be specific driver implementations for specific DBS that will permit you to EXPLAIN your query (trace using indexes), etc. There is however nobody-size fits all answer here.
generally I'd lean to saying no thanks.
Your index performance relies upon the queries you'd fire in it...So No !
With MySQL particularly, you are able to flag slow queries, in addition to queries not using indexes.
Ultimately, the database is going to do its best (within what you've produced) to optimize your query.
This data could be drenched to some file, and never always available with an API.