3

I am on a shared hosting which has a limitation at MySQL queries per hour. My shows unable to connect to database because of this.

Can anyone tell me how many queries are per page on a wordpress site with default theme instaled on?

PS: I haven't any plugin installed.

1

Wordpress uses a lot of plugins and is very query heavy but the in spite of that, the front page uses 59 queries to generate itself. I think the default (on a vanilla WordPress install on the default theme) is 27 or something of that nature. The larger the number of queries, the slower the page is going to load and the more load you are going to put on your MySql server. All of the above is true if you do not use inline or regenerative caching mechanisms.

If you want to know more go through this link and you can also calculate the number of queries using this plugin Debug Bar plugin

  • 4
    This is very anecdotal. Any specific number of queries is tied to the code, content, and configuration. Neither is count of queries generic performance indicator. 1 slow executing query can stress server more than 100 fast ones. – Rarst Jul 17 '14 at 10:58
4

This is all depends on what queries do you run on a page, are you using simple or complicated queries etc. There are really no set minimum or maximum amount of queries to a page. You will need to look in context of your site specifically and weigh the amount of queries to what is actually happening on your page.

Wordpress can be quite harsh on resources with certain queries, so you will need to take that into account as well.

But in the end it all boils down to time vs queries. This should be your goal, if you can get the job done in less time with more queries, you should do it, you should not be hampered by a low quality host.

My advice, you should find an appropriate host that can handle your queries and not limits you or Wordpress because of normal functionalities.

4

Use Query Monitor Plugin.

This will tell you how many Queries along with the time taken by each, at what place it was called along with stack trace.

It will even tell you time taken for page generation.

As others told, the number of queries is not the right parameter, but having anything over 100 would not be a good indicator in general.

The Plugin is free and licensed under GNU General Public License.

To quote the author of the plugin:

Query Monitor focuses heavily on presenting its information in a useful manner. For example, aggregate database query information is made available, allowing you to quickly determine poorly performing plugins, themes, or functions. It adds an admin toolbar menu showing an overview of the current page, with complete data shown in a panel once you select a menu item.

Sample output:

Query Monitor Sample Output

For more information, please see:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.