johnpalmer: (Default)
[personal profile] johnpalmer
Wow.

It's only a page, but it's my first serious T-SQL project. It uses current system objects (tables/views/etc.) to find how badly fragmented your indexes are. It shows the fragmentation on the clustered indexes (these are the ones that you need de-fragged the most), and also reports on the worst fragmentation on any non-clustered index. That way, if your clustered index is <5% fragmented (which means "don't bother defragging"), but you have a really badly fragged non-clustered index, you'll know. (You won't know which index, but you'll know to check them all.)

And, can I say, wow.

Programming in SQL is very different from programming in anything else. You have to think about sets and how to combine them, and just the simplest of errors can mean you miss crucial data, or end up repeating useful data so many times it becomes unreadable.

Date: 2008-09-06 02:49 am (UTC)
From: [identity profile] phoenixpdx.livejournal.com
Oh, very cool! I'm glad you're having fun.

Profile

johnpalmer: (Default)
johnpalmer

June 2025

S M T W T F S
1234567
89 1011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 11th, 2025 08:50 pm
Powered by Dreamwidth Studios