多少查询太多? [英] How many queries are too many?

查看:47
本文介绍了多少查询太多?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在一页中为一个人运行10次mysql查询.这很不好吗?我有很好的托管服务,但是仍然可以中断吗?非常感谢.

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.

推荐答案

10个快速查询可能比1个慢速查询更好.确定响应时间,吞吐量,正常和偷看交通状况下可接受的条件,并衡量这10个查询是否有问题(即不遵守您的期望).

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.

这篇关于多少查询太多?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆