SELECT * and SELECT fields are optimized.
Let's test it. My test database contains 0.26 million records.
Query the number of columns:
Select count (*) FROM information_schema.columns WHERE table_schema = "lezhi_data 'AND table_name = 'demo _ jobs_store ';
43 columns are returned. This number should have a preliminary effect as the test data.
Let's try to query a SELECT field to see the response time:
We can see that a field is executed for 7.724 seconds.
Let's execute two more fields to check the effect.
If there are two fields, the time is 15 seconds.
We can add more fields. <� "Http://www.2cto.com/kf/ware/vc/" target = "_ blank" class = "keylink"> vcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140331/2014033109075048.jpg" alt = "">
We can see that the time is as long as 29 seconds.
From the above, we can see the huge difference in execution time. PS. The red box of my first image is incorrect.
Therefore, in the actual application process, we try to SELECT the fields we need as much as possible.