There are many which can be performed as a Maintenance task for
Index Maintenance, but here we will see some high end task at least which
should be included in your Index Maintenance task.
- Index Fragmentation, Identify and remove index fragmentation
- Outdated Index, Identify skewed and outdated index and column statistics and ensure they are representative and up-to-date
- Missing Indexes, Identify and create missing indexes
- Remove Unused Indexes, Identify and remove unused indexes
- Index Maintenance Job, Creating and monitoring index maintenance jobs
Let’s take a brief look at each one of these, one at a time.
Remove Index
Fragmentation
The easiest way to remove index fragmentation is to defragment all
of your database’s indexes every day. If you have a small database, and you
have defined maintenance times, this might be a viable option. On the other
hand, many databases are relatively large and must be available 24x7 throughout
the day. In these cases, it is often not practical to defragment every index
every day. Instead, you want to have the ability to identify only those indexes
that really need to be defragmented, and focus on those.
Skewed and
Outdated Index and Column Statistics and Ensure they are and Up to Date
Index statistics are used by the query optimizer to help in
determine when and which index should be used hen executing a query. If these
statistics are stale, or out-of-date, then the query optimizer might not make
the best choice when selecting the indexes used to perform the execution of
query.
Identify and
Create Missing Indexes
User can make use Index tuning wizard to know the missing Indexes.
Else he can look out each query to analyze the execution plan to find the
missing Index statistics, once you have indentified the missing index, your
task involve in creating those indexes. Take
the advantage of tool that can help you identify many missing indexes with
minimal effort? While I refer to this process as automation, it is not really
100% automated. Some of the steps of this maintenance task still should be done
by hand, and DBAs also need to make a judgment about the indexes the Database
Engine Tuning Wizard recommends before you blindly let it create new indexes
for your databases.
Identify and
Remove Unused Indexes
What’s the point of using up resources modifying indexes that
never will be used? Unused indexes should be removed from your databases. SQL
Server 2005 and SQL Server 2008 make it easy to identify unused indexes in a
database using DMVs. Essentially, these DMVs track every time an index is used,
which means you can easily determine which indexes can be safely removed. While
in theory you could entirely automate this maintenance task, I prefer to do it
manually because there are often some circumstances that automation can’t
easily take into account.
Creating and
Monitoring Index Maintenance Jobs
This is the step where you create the scripts necessary to perform
automated index maintenance, and then schedule them with the SQL Server agent.
In addition, you will want configure your SQL Server to notify you if any of
these jobs fail, so you can ensure that index maintenance is performed as you
expect.
In coming articles we will pick each Index Maintenance task and go
deeper to each Indexes problem n there by resolving the issues concern with
Indexes.
Why coders take
pleasure in stupidity, because they are highly intelligent alien race
Post Reference: Vikram Aristocratic Elfin Share
No comments:
Post a Comment