How else can you see the actual SQL code generated by Wordpress or phpBB?
The first thing we’ll need to do is turn on logging of queries in MySQL.
Find and open your MySQL configuration file, usually /etc/mysql/my.cnf on Ubuntu.
tail -f /var/log/mysql/mysql.log
Now run your app.
You’ll see the database queries start flying by in your terminal window.
Wordpress, on the other hand, is very inefficient.