hannibal Posted December 8, 2007 Share Posted December 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/80764-solved-no-of-queries-per-page/ Share on other sites More sharing options...
themistral Posted December 8, 2007 Share Posted December 8, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/80764-solved-no-of-queries-per-page/#findComment-409849 Share on other sites More sharing options...
hannibal Posted December 9, 2007 Author Share Posted December 9, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/80764-solved-no-of-queries-per-page/#findComment-410253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.