Indexing

Technical Article

Script to aid in Indexing Strategy

  • Script

When AUTOSTATS is used in a database, we can sometimes use these automatically generated statistics to find columns where SQL Server has built statistics on non-indexed columns that may benefit from an index. This script finds these columns and displays the selectivity of them. This script can be useful in troubleshooting poorly performing databases by […]

(1)

You rated this post out of 5. Change rating

2007-04-09 (first published: )

1,758 reads

Technical Article

Update statistics for all tables in any DB

  • Script

Most of the time even after executing dbcc dbreindex script on database you won't see much improvement in application/DB performance.  Thats because dbreindex creates statistics for all tables but it executes sp_updatestats which is like sample statistics. To get the maximum performance we had to execute Update statistics with fullscan on table. This simple will […]

(8)

You rated this post out of 5. Change rating

2006-12-22 (first published: )

21,334 reads

Technical Article

Quick Fix secondary Indexes ( SQL 2000 )

  • Script

In real world production tuning sometimes a "quick fix" is required. This script will generate index create scripts for any column ending ID which doesn't have an index. It's dirty and its quick but you might just be amazed by the results when run against your database!

You rated this post out of 5. Change rating

2007-07-11 (first published: )

507 reads

Technical Article

List all indexes with keys, description and size

  • Script

This script combines functionality of sp_helpindex and sp_spaceused to list all tables with individual indexes, their keys and description  (sp_spaceused cannot do that) and size in MB per individual index (sp_helpindex cannot do that either). Feel free to use and modify as you see fit. Hope it can help.

(9)

You rated this post out of 5. Change rating

2007-07-03 (first published: )

2,661 reads

Blogs

TRY_PARSE Limitations: #SQLNewBlogger

By

I got a notification from a question I’d posted at SQL Server Central: Getting...

SQL Server sa Account Security: Rename, Disable & Best Practices

By

SQL Server sa Account Security: Rename, Disable & Best Practices In...

Stanford Emerging Technology Review 2026 Report is out

By

Artificial Intelligence and quantum computing are two areas of emerging technology that receive most...

Read the latest Blogs

Forums

Are You Working More Hours?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Are You Working More Hours?

Stairway to Reliable Database Deployments Level 6 – Managing Changesets Over Time

By Massimo Preitano

Comments posted to this topic are about the item Stairway to Reliable Database Deployments...

A Limited Startup

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Limited Startup

Visit the forum

Question of the Day

A Limited Startup

I add this parameter to SQL Server 2025 in the Configuration Manager:

-mDynamics
What does this do?

See possible answers