SQL indexes

We've been having some performance issues with slowness.

In one of the tables I saw some some clustered indexes. When I looked into the properties of the clustered index, I saw an option for fragmentation. I assume that Total fragmentation means 'how fragmented the cluster is' correct?

Index-Fragmented.png
LVL 1
isamesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gplanaCommented:
Yes, this means that this index is stored on different fragments on your hard disk, which in fact means that your table is stored on different fragments on your hard disk, because an index cluster in SQL-Server is what some other RDBMS call Index-Organized Table, which means that all table is stored on the index, or in other words, table is organized on a B-Tree way, according to the key of the cluster index.

This is also the reason why a table only can have a cluster index.

I would recommend to defrag.

Also, you should investigate which is the SQL which is slow, and look for its query plan (maybe you think it uses the index, and it is not using it).

Hope it helps. Regards.
Aneesh RetnakaranDatabase AdministratorCommented:
put a maintenance solution to reindex/reorganise the indexes .
Lots of us use the maintenance solutions from here  https://ola.hallengren.com/
Scott PletcherSenior DBACommented:
Yes, that index is way too fragmented, but that's a very small table overall and is not likely to cause a big performance hit.

The first thing to do for performance is to make sure that each table has the best clustered index.  You can use the missing index stats and index usage stats to help determine this.  Then determine what nonclustered indexes are needed.  Then, finally, yes, make sure you rebuild or reorganize those indexes as needed later.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Umair QamarCommented:
less fragmentation is good and fill factor of index should be around 90%.
You should use Brent Ozar's scripts to tune your indexes and other matters related to database.
I am attaching a script in this post. Please find and use it. It's safe.sp_BlitzIndex.sql
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.