How many MySQL queries should I limit myself to on a page? PHP / MySQL

后端 未结 10 1379
春和景丽
春和景丽 2020-12-10 13:16

Okay, so I\'m sure plenty of you have built crazy database intensive pages...

I am building a page that I\'d like to pull all sorts of unrelated database informati

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 13:45

    Premature optimisation is a problem like people have mentioned before, but that's where you're crapping up your code to make it run 'fast'. But people take this 'maxim' too far.

    If you want to design with scalability in mind, just make sure whatever you do to load data is sufficiently abstracted and calls are centralized, this will make it easier when you need to implement a shared memory cache, as you'll only have to change a few things in a few places.

提交回复
热议问题