Monitor performance mysql

for osCommerce Online Merchant v2.2

This little piece of code helps you to find which queries are slow. Of course you can play a bit with MYSQL_SLOW_QUERIES but I like to have the info about slow queries in the database so I can sort and find the slowest querie in a flash. Also not everybody has access to their MySQL settings. When you know which queries are slow you can have another look at your database structure and add some indexes or change your code a bit. Not all queries are that optimized..... IMPORTANT: * This contribution will not make your webshop faster! It only helps you find bottlenecks. * Please keep an eye on the size of the qlog table, if you run the script on a slow server or set the log treshold low the size of the qlog table can grow very big causing perfomance issues * When you are ready debuggin set back the function to the old values or set the treshold high that only queries about 2 seconds are logged. * ONLY USE THIS CONTRIBUTION IF YOU KNOW WHAT INDEXES / QUERIES ARE, ELSE THIS CONTRIBUTION IS OF NO USE TO YOU!

Files