[For 1.8] Database Helper - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Releases (https://community.mybb.com/forum-102.html) +---- Thread: [For 1.8] Database Helper (/thread-215843.html) |
Database Helper - dragonexpert - 2018-02-09 Plugin Name: Database Helper Latest Version: 2.0 Uses Language: Yes Languages Available: English Download: https://community.mybb.com/mods.php?action=view&pid=1083 Github: https://github.com/dragonexpert/database_helper Installation: 1) Upload everything in the zip file to their respective directories. 2) Activate in the Admin CP. 3) View slow queries in Admin CP ->Tools & Maintenance -> Slow Query Log Debugging: If you have a page that is running slow, you might consider using search and replace to look for $db-> and change it to $db->helper-> in that file. This will force any queries to go through the helper which will also log any query that takes longer than 2 seconds to execute. You are then able to view the entry in the Admin CP and see how long it took for the query to execute. Methods:
Writing New Code: The only difference you will need to make to your code is using $db->helper-> instead of just $db->. RE: Database Helper - dragonexpert - 2018-02-13 I have a new version on Github that needs testing. The new version also logs the value of the constant THIS_SCRIPT and the name of the file that generated the query. These improvements will make it faster to find the problem. RE: Database Helper - Omar G. - 2018-02-17 It would be perfect if it would log front end error messages as well. RE: Database Helper - .m. - 2018-02-17 ^ would you suggest merging of Error Viewer plugin code with this ? RE: Database Helper - Omar G. - 2018-02-17 Pretty much, yes .m. |