本文介绍了select语句中的列顺序是否会影响查询速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,我有一个这样的数据库:
For example, I have a database like this:
id | fname | lname | sex | age | tel | cell | address如果我执行select cell, fname, address, sex而不是select fname, sex, cell, address,这会影响大表中的查询速度吗?
If I do select cell, fname, address, sex instead of doing select fname, sex, cell, address, will that affect the speed of query, in big tables?
我在phpmyadmin中进行了快速检查,这似乎花费了相同的时间,但是我想再次检查.
I did a quick check in phpmyadmin and it appeared to be taking same time, but I wanted to double check.
谢谢.
推荐答案那没有什么区别.
但是,省略SELECT子句中的列将使其运行更快,因为它将通过网络发送较少的数据.
However, omitting columns from the SELECT clause will make it run faster since it'll send less data over the network.
更多推荐
select语句中的列顺序是否会影响查询速度?
发布评论