SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Improving performance on joins to large tables.


Improving performance on joins to large tables.

Author
Message
cadebryant
cadebryant
SSC-Addicted
SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)

Group: General Forum Members
Points: 461 Visits: 14
Comments posted to this topic are about the item Improving performance on joins to large tables.



prasad_wickramasinghe
prasad_wickramasinghe
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 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/
GilaMonster
GilaMonster
SSC Guru
SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)SSC Guru (473K reputation)

Group: General Forum Members
Points: 473657 Visits: 47381
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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search