Jump to content

Recommended Posts

Hi,

 

I have been using MySQL/PHP combo for a while now and just have a question.

 

I know this is hightly dependant on what type of queries are required within the page and also the server processing power, but what would be an acceptable number of MySQL queries to make per page.?

 

For example, would 1 - 14 queries be ok, but say 30 MySQL queries on one page be deemed as a lot of queries for x server to process?

 

Bit of an ambiguouse question I know, but I am curious.

 

Many thanks,

 

Jamie.

Link to comment
https://forums.phpfreaks.com/topic/80764-solved-no-of-queries-per-page/
Share on other sites

Hi Jamie,

 

I am no expert on this, but I presume you are not running all the queries at once?

 

If the queries are required to populate all the content on the page then having a lot of them may impact on how quickly the site loads...but would you really need to be processing 30 queries at once?

Probably wouldn't be as many as 30, I just need to know what I should store in a session or what I should re-query.

 

For example, I may need to make 6 or more queries for the whole page to load. This could consist of updating a page count, gathering information about the item the user is viewing, displaying other associated information stored in the DB, etc. The number of queries could mount up and although I know that MySQL is very fast, I just wanted a heads up as to what a practical limit is to the number of calls I should be making (if I can help it).

 

Probably too much of an ambiguous question. Probably the best method to find out would be to just trial what I need to do and if the page takes too long to load locally, then it is certainly going to take a long time to load when hosted. An example of what I was thinking is for example the "MyEbay page". That has loads of user information and must complete many DB calls to load the page with user information.

 

This post can be resolved.

 

Thanks,

Jamie.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.