September 24, 2007 at 1:36 am
Comments posted to this topic are about the item Improving performance on joins to large tables.
June 30, 2008 at 11:47 pm
Here u can improve performance more by specifying column names rather than using "*". Because using * queries sys.columns system table for get the column names, which is unnecessary when we can simply specify them.
But you have to remember to update SP when u change the table(columns).
regards,
July 1, 2008 at 12:10 am
SQL has to do meta-data lookups whether or not * is specified as it has to find the types and the column lengths.
The reasons to not use select * are more around only retrieving the columns that you need and not returning all of them out of laziness. It's also so that code won't break if a new clumn is added to a table. finally, select * makes creating covering indexes almost impossible.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy