Indexing

Technical Article

Stabilize Index

  • Script

This sp is used to update index in a database.  This sp has got three optional varchar parameters.  First parameter will take the tablename. Second parameter will take the indexname.  Third parameter will take the fillfactor.  The following option we can execute the sp in a user database.1.    exec StabilizeIndexIt will update all index in […]

1 (1)

You rated this post out of 5. Change rating

2003-10-29

276 reads

Technical Article

Find Duplicate Indexes - Episode 1 (The Early SQL Versions)

  • Script

The excellent script contributed by G.R. Preethiviraj Kulasingham (Preethi) Sri Lanka (contributed 2/20/03, modified 5/22/03) identifies duplicate indexes for the database on which the script is run.  It requires User Defined Functions, a feature restricted to SQL Server 2000.This version achieves similar results without using UDFs or creating any other permanent objects. It therefore works […]

4 (1)

You rated this post out of 5. Change rating

2003-05-28

744 reads

Technical Article

Unattended Reindexing of all user tables

  • Script

I see scripts all the time on how to reindex all the tables in a db but they are usually too generic and may cause issues.  For instance they typically cause the log file to grow very large and may even fill the hard drive.  This is intended to be run off hours when db […]

You rated this post out of 5. Change rating

2003-04-24

621 reads

Technical Article

DB Reindex all Databases

  • Script

This script reindexes all tables in all databases.  Execute the script with the desired fill factor and it will do the rest.  There is an option to exclude databases from the reindex. This makes it easy to reindex all newly created databases. Great for the Development environment when Developers are creating database all the time.

You rated this post out of 5. Change rating

2003-03-23

1,803 reads

Technical Article

Selective Defrag/Reindex and Log

  • Script

SQL 2000 OnlyThis script will create a stored procedure and a table in the master database. Simply run the stored procedure and supply a database name as a parameter. It will do the following:1. Gather/Log DBCC SHOWCONTIG statistics (pre defrag)2. Defragment all user indexes in the database3. Gather/Log DBCC SHOWCONTIG statistics (post defrag)4. DBCC DBREINDEX […]

5 (3)

You rated this post out of 5. Change rating

2010-04-19 (first published: )

2,201 reads

Technical Article

Dynamic DBCC DBREINDEX

  • Script

This script uses sysobjects and sysindexes to ID all tables in a database that are indexed, and/or clustered.  It then runs through per table all of the indexes and runs DBREINDEX with their fillfactor.  This eliminates having to maintain a list of all indexes and having code fail when it tries to modify indexes that […]

You rated this post out of 5. Change rating

2002-12-19

1,723 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

test new topic

By philip.scott

posting a new topic

New article

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New article

Monitoring Azure Blob Storage

By arindamxs

Comments posted to this topic are about the item Monitoring Azure Blob Storage

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers