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


The Ultimate Index Lister (Non-Pivoted)


The Ultimate Index Lister (Non-Pivoted)

Author
Message
YeshuaAgapao
YeshuaAgapao
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1145 Visits: 211
Comments posted to this topic are about the item The Ultimate Index Lister (Non-Pivoted)



wchaster
wchaster
SSC Journeyman
SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)SSC Journeyman (95 reputation)

Group: General Forum Members
Points: 95 Visits: 109
Where does this SP need to be created, I created it in Master and it only returns result from the dbo or sys schema's.

:-D
ACN is the world's largest direct seller of telecommunications and essential services.
http://helpu.acndirect.com/
ACN Digital Phone Service customers automatically enjoy unlimited calling to 60 landline
destinations around the world, including India, Mexico and the UK!
Hehe
YeshuaAgapao
YeshuaAgapao
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1145 Visits: 211
You need to place it in the database you need to get results for. Had to make it that way to be sure to be able to get table names.



Manie Verster
Manie Verster
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2031 Visits: 1023
Great article! This came at just the right time for me! I was trying to do exactly this but got stuck but now, thanks to you!, I don't need to battle anymore. I have one question. I am trying to understand exactly what indexes are and what impact they can have on the database and yes, I think I have that but what I don't quite get is the Included Columns. What impact can they have on a table or the database as a whole? I have, with the help of your sp, identified a table of which the indexes looks cosher but one index have nearly all of the table's columns as included columns. Is this right?

:-PManie Verster
Developer
Johannesburg
South Africa

I can do all things through Christ who strengthens me. - Holy Bible
I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)
YeshuaAgapao
YeshuaAgapao
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1145 Visits: 211
Included columns are available only to cover to query (prevent bookmark lookups), but not for seeks. Included columns can assist in exploiting the fact that clustered indexes append its key as seeks (non-unique indexes; it appends as includes for unique indexes) at the end by limiting columns only needed to prevent bookmark lookups to the leaf level. I have several indexes with one or two seek columns and 3+ include columns (for covering the query) that rely on the clustered index key for 3rd or 4th seek columns. If these 'cover the query' only columns were seeks, it would ruin clustered index exploitation for additional seek columns.



Iwas Bornready
Iwas Bornready
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18668 Visits: 885
Thanks for the script.
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