Home >Backend Development >C#.Net Tutorial >Compare select * and select all fields to write speed examples

Compare select * and select all fields to write speed examples

零下一度
零下一度Original
2017-06-23 16:00:283089browse

From a very early age, I heard the teacher say that select * from table is much slower than select a,b,c,d from table. Never tested in 3 years. I'll take a test today if I have nothing to do. I don't know if something unexpected happens. I'll be shocked if I take the test.

Of course the following is purely a test and has not been applied to actual projects. If you have any comments or suggestions, please let me know.

Number of times *No. query Field query
First Time

Second Time

the third time

##The test code is as follows:

The above is the detailed content of Compare select * and select all fields to write speed examples. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn