Indexing

Technical Article

Defragment all table indecies

  • Script

To help maintain index quality, defragging of any given index is a good thing. This will defrag ALL indecies in the current DB. NOTE: Schedule for off-hours operations. For a massive re-write of indecies, change the remarking on "--IF @indid" lines to use reindex instead of just defragging.

You rated this post out of 5. Change rating

2004-09-21

567 reads

Technical Article

Script to show user indexes tables(Sql 2000)

  • Script

This script is supported only in SQL SERVER 2000, This shows only indexes created by users in tables.Parameter @tabela--> You can put the table name and get the information about users indexes in this table.OrYou can put nothing (NULL) and see all tables on the schema and how many indexes each table have.

You rated this post out of 5. Change rating

2004-09-10 (first published: )

238 reads

Technical Article

Drop Indexes

  • Script

This script drop all indexes from table, including Primary Key contraint. First it del nonclustered indexes, then clustered and at last - drops PK contraint. This scirpt is useful, when you need drop all indexes, like when doing ETL process.

4 (1)

You rated this post out of 5. Change rating

2004-03-17

531 reads

Blogs

Build Recovery into the Design

By

It's like disaster recovery (and business continuity) planning is the end-of-term research paper that...

dataMinds Connect 2024 – Session Materials

By

The slides and scripts for my session “Tackling the Gaps & Islands Problem with...

Want to Supercharge Your Business? SQL is Your Secret Weapon.

By

Look, we all know data is king these days. But having mountains of data...

Read the latest Blogs

Forums

Log Backup failed on Secondary Replica

By aroojsql

I have a scenario where log backup is getting failed in Secondary replica on...

Everything is Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Everything is Code

Statistics Histograms

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Statistics Histograms

Visit the forum

Question of the Day

Statistics Histograms

I have a statistics objects with 2 key columns from my tables. How many histograms and their type are stored?

See possible answers