MySQL with slow queries
If you are using MySQL v5.6 because Performance_Schema has lot of metadata about your query/table and how the processing of a query happened (almost everything that is helpful for you to debug a problem/query internals)


You can have a look at my existing answer here:
Is there a way to get slow-query-log-like profiling information on a single query?


Otherwise, You can try Show Profiling functionality of MySQL to find out where most of the time has been taken by a query execution and optimize based on result:

set profiling=1;

Run your slow query (eg SELECT * FROM table WHERE name='xxx';

SHOW PROFILES;


http://dev.mysql.com/doc/refman/5.0/en/show-profile.html

Analyze EXPLAIN EXTENED output and optimize query accordingly and profile the query again to see gain in performance.