How many queries are too many?

前端 未结 8 1327
暗喜
暗喜 2021-01-01 12:47

I have to run one time 10 mysql queries for one person in one page. Is it very bad? I have quite good hosting, but still, can it break or something? Thank you very much.

8条回答
  •  猫巷女王i
    2021-01-01 13:37

    I think its not a problem. 10 Queries are not so much for a site. Less is better no question but when you have 3000 - 5000 then you should think about your structure.

    And when you go in one query through a table with millions of rows without an index then are 10 to much.

    I have seen a Typo3 site with a lot of extensions that make 7500 requests with the cache. This happens when you install and install and don't look at what happens.

    But you can look that you make logical JOIN's over the tables that you have less queries.

提交回复
热议问题