Indexing

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 […]

2002-12-19

1,671 reads

Smart Index Manipulation system

  • Script

We are constantly having to drop indexesfrom tables while repopulating the datain the table. We then have to rebuild the indexes as they were before dropping them.This requires writing a custom drop and recreate index script for each unique situation. If we tryto write scripts ahead of time as soon as the indexing schemechanges on […]

2002-08-06

925 reads

Index Locking Strategy

  • Script

This script returns the index locking strategy informationfor all user tables in a database. It also generates the required TSQL statement to alter locking strategies if required. These statements require CTRL-C and CTRL-V individually into query analyser for execution. Results are best viewed in text only. This TSQL can be wrapped in a stored procedure […]

4 (1)

2002-07-04

1,367 reads

DBCC SHOWCONTIG in all Tables

  • Script

Use this script to see showcontig for all tables in the context of the database in which its called. Very handy to schedule during off peak hours prior to any re-indexing to see how bad things are and re-build certain indexes sooner than you thought for peak performance.

2001-08-20

3,346 reads

Blogs

Performance Tuning Steps Query by looking an execution plan and effectiveness of the index Part 2

By

How to read execution plan to improve poorly... [[ This is a content summary only....

VSCode Tips–Remove the Highlighted Line

By

VSCode was making me crazy as I was writing a script. I like a...

Use T-SQL, not the GUI

By

There’s a very good reason to do most of your DBA work using T-SQL,...

Read the latest Blogs

Forums

Azure Stretch Database, Part I: Getting Going

By SQLBlimp

Comments posted to this topic are about the item Azure Stretch Database, Part I:...

Minimalistic SELECT

By Thomas Franz

Comments posted to this topic are about the item Minimalistic SELECT

business intelligence development studio(Bids)

By Nivs719

Hello, I have a SQL 2017 and I want to use business intelligence development...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers