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

5 (1)

You rated this post out of 5. Change rating

2007-04-09 (first published: )

1,740 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 […]

4.75 (8)

You rated this post out of 5. Change rating

2006-12-22 (first published: )

19,640 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: )

487 reads

Blogs

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

The Comprehensive Guide to Mastering Your SQL DBA Skills

By

Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...

Friday Basics: Authentication vs. Authorization

By

Another security fundamentals topic is authentication versus authorization. For those who have a clear...

Read the latest Blogs

Forums

The OS returned the error '(null)' while attempting 'DeleteFile' filestream.hdr

By lmarkum

I have a SQL Server 2019 Enterprise Edition on CU 25. It has in-memory...

Take Care

By Grant Fritchey

Comments posted to this topic are about the item Take Care

Performance

By LearningDBA

Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers