|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, November 05, 2008 2:49 PM
Points: 57,
Visits: 14
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, July 01, 2008 12:22 AM
Points: 1,
Visits: 2
|
|
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, http://onlinecoder.blogspot.com/
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:28 PM
Points: 37,730,
Visits: 29,996
|
|
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 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|