How many queries are too many?

前端 未结 8 1324
暗喜
暗喜 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条回答
  •  无人及你
    2021-01-01 13:45

    10 fast queries can be better than 1 slow one. Define what's acceptable in terms of response time, throughput, in normal and peek traffic conditions, and measure if these 10 queries are a problem or not (i.e. don't respect your expectations).

    If they are, then try to change your design and find a better solution.

提交回复
热议问题