Number of hits to the WordPress database

To know the number of accesses to the database by your site on WordPress, you need to file the theme footer. php before the tag add the following code.

<!--?php echo get_num_queries(); ?--> queries in <!--?php timer_stop(1); ?-->

You will also learn the time spent on processing all calls to the DATABASE.