How many queries are too many?

前端 未结 8 1286
暗喜
暗喜 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

    It depends on how much CPU cycles will the sum of the queries use.

    1 query can consume way more CPU cycles than 100. It all depends on their contents.

    You could begin by optimizing them following this guide: http://beginner-sql-tutorial.com/sql-query-tuning.htm

提交回复
热议问题