Is there any difference in data retrieve speed if I select only specified fields in the query instead of using asterisk for selecting all? "select name,date" or "select *" Which is faster? Note, that I need to output only two fields of 10! Is there any difference? Thank You for any advice.
There will not significant difference of your database is not huge. However, when you dealing with thousands of thousand rows, there will be the problem. In all case, only select fields that is needed, minimal resource used is always preferable.
Hi, Like zandigo pointed out, large databases will be much slower as you're fetching every field from the table. Make sure to only select the data you wish to use and that the table has proper indexes to make selecting quicker. Regards, Steve
That was exactly what I needed to know about! My database does not have a lot of fields, but for me every millisecond counts. Thank You