Solved

Index Fragmentation

Posted on 2012-03-28
5
308 Views
Last Modified: 2012-03-28
I was said that application is running slow so i need to make sure from the database point that it is working fine.
 When I check the fragmentation of index in all the table it  is fragmented by 80% or higher. But when I see the execution plan of some of the  query used by the application  there is  always index seek . Some of tables have 5 million rows and some has couple of hundreds of thousands .

So, my question  is Is it possible to use index seek  by the execution plan even though the index fragmentation is more than 80%. In such situation do I need to rebuild the indexes.
I haven't seen my maintenance plan for the index in the database in our system.

Could it possible that because of the index fragmentation  the application is being slow.


Thanks  in advance
0
Comment
Question by:manojbaba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 37778310
0
 

Author Comment

by:manojbaba
ID: 37778480
Thanks Icohan,  

The link was  very informative but I really wanted to get answer to this part of the question

Is it possible to use index seek  by the execution plan even though the index fragmentation is more than 80%. In such situation do I need to rebuild the indexes.
0
 
LVL 25

Expert Comment

by:TempDBA
ID: 37778491
Are this plans that you are talking about are actual plan or estimated plans? Defragmenting the indexes will be useful. Just also check whether the indexes that you are talking about are what really is being used in the plan..
0
 
LVL 40

Expert Comment

by:lcohan
ID: 37778764
"Is it possible to use index seek  by the execution plan even though the index fragmentation is more than 80%. In such situation do I need to rebuild the indexes."

Of course it is possible however the performance will suffer until you can rebuild the index. One issue may be if the index is clustered and there are gaps in keys then fragmentation may allways be there to some degree.
0
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 37778776
And I know there are ways to DEFRAG an index however from my SQL experience that never had a signifficant positive impact like rebuild or recreate no matter how painful that may sound. In fact you could add a parrallel index with same composition different name and ONLINE=ON, do a UPDATE STATISTICS on that table and eventualy a SP_RECOMPILE table_name to flush old query plans using old index from cache, drop old and refres stats again.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
efficient backup report for SQL Server 13 81
SQL Server 2012 to SQL Server 2016 24 57
SQL - Load records to temp table through CTE 6 38
SQL Server Error: 4060 8 33
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question