The Fragmented Index Bow Tie Review

0 comments

Little known fact, telling fabulous stories about bow ties is not my day job. Actually, my full time job is a SQL DBA (Database Administrator)  It's hard work but someone has to reindex those fragmented tables. If you are ever in the need for a quick script to find fragmented indexes across all databases take a look at this handy script, from our good friend over at www.SQLAuthority.com. Pinal Dave exhibits a whole plethora of information about SQL Server, and heck we probably should have just named this bodacious bow tie after Mr. Dave, but I digress.

SELECT ps.database_id, ps.OBJECT_ID,

ps.index_id, b.name,ps.avg_fragmentation_in_percentFROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) ASpsINNER JOIN sys.indexes AS b ON ps.OBJECT_ID = b.OBJECT_IDAND ps.index_id = b.index_idWHERE ps.database_id = DB_ID()ORDER BY ps.OBJECT_ID

GO
Anyways, lets focus on this busy bow tie. Notice it's deep woven checkered roots. Spinach greens, mustard yellows, and mother of pearl whites. This bow tie lets you show off your geeky-ness, if you know what it's all about, and if you don't, that's okay too. Because, this bold beautiful bow tie will pop in any event. If you want to know a little more about SQL check out my other blog post - SQLROOK

[caption id="attachment_47" align="aligncenter" width="490"]Fragmented Index Bow Tie Fragmented Index Bow Tie[/caption]

Leave a comment

All blog comments are checked prior to publishing
You have successfully subscribed!
This email has been registered