php - Average number of queries for best performance -


i hope guys wont mind asking off-topic , naive question. but, not find satisfying answer this. maximum, how many queries on average page must allowed process rendering output(i looking quality aspect). example in e-commerce application, 4 5 queries on average required. minimum number of queries, shorter response time. hence question. question irrespective of programming platform. but, lets consider php , mysql example.

a single complex query takes half second execute less optimal running 5 simple queries take total of 1/10 of second complete.

having higher number of simple queries may trade-off in order keep code more organized. orms, example, wind making higher number of database calls if manually writing queries, make application substantially simpler develop.

ultimately, though, application that's complex enough need worry number of database calls complex enough should utilizing caching layer wherever possible anyway. long there no pages take long time load, it's not worth nitpicking exact number of queries.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -