I've got shared hosting on a LAMP set up. Obviously the fewer calls to the Db per page the better. But how many is too many? Two? Ten? A hundred? Curious what people think.
That really depends on your (db)servers setup. Try to cache most of information as possible and reduce db calls to a minimum. A database will (almost in every case) be the bottleneck of your service - the higher the usage of your site. So whatever you do try to avoid fireing a query as if not really necessary.
I try not to use more than 10 db calls per page, but that really depends on your infrastructure and the information you want to provide.
I would say that depends on the server load. If you have 1 visitor per minute, then 1-10 db calls per page would be just fine. If your server load is higher than that, say 10 page requests per second, then you should consider caching to minimize the load on your db server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With