Mysql Queries per Visit – Crazy High

It goes against the grain here to recommend plugins but that’s what you need here.

To view in the browser;

https://wordpress.org/plugins/query-monitor/

To view in WP-CLI;

https://runcommand.io/wp/query-debug/

Both of these will list the queries and how long each one takes. That should give you enough information to make informed decisions about what to do in your case.

https://codex.wordpress.org/Debugging_in_WordPress

In your wp-config.php you may need to add defined( 'SCRIPT_DEBUG') or define( 'SCRIPT_DEBUG', true ); as well as define( 'WP_DEBUG', true );