select语句中的列顺序是否会影响查询速度?

编程入门 行业动态 更新时间:2024-10-22 19:23:19
本文介绍了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语句中的列顺序是否会影响查询速度?

本文发布于:2023-10-16 16:23:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1498086.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是否会   语句   顺序   速度   select

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!