Indexing and Statistics

Designing, evaluating, maintaining, and troubleshooting indexes and statistics.

568 associated posts270 primary posts

Performance Tuning

What’s Better: Disabling vs. Dropping Indexes?

In order to improve your applications and your databases, they will need to change over time. The structure of the database changes, the structure of the tables change, the data in the tables change, the application changes, the queries against the data change. Indexes that once helped performance now just bloat your database and cause extra work for inserts, updates, and deletes.

Read more about What’s Better: Disabling vs. Dropping Indexes? 52 comments — Join the discussion

Best Practices + Table Partitioning: Merging Boundary Points

One of the many best practices for SQL Server's table partitioning feature is to create "extra" empty partitions around your data. This is explained in SQL Server Books Online in the page on altering a Partition Function: Always keep empty partitions at both ends of the partition range to guarantee that the partition split (before…

Read more about Best Practices + Table Partitioning: Merging Boundary Points Be the first to comment

The Okapis of SQL Server Indexes

They are elusive and hard to spot in the wild, but they exist: rare index options that can enhance the performance of your queries. If you have a solid knowledge of index basics and want to add to your collection, this is the session for you! In this 30-minute video, Jes will show you how filtered indexes, compressed indexes, and indexed views work and can improve performance.

Read more about The Okapis of SQL Server Indexes 11 comments — Join the discussion

SQL Server Table Partitioning Tutorial: Videos and Scripts

There's a secret to learning about SQL Server's table partitioning feature: you need to get your hands on some code and really play with it in a test environment.

In this tutorial, Kendra will walk you through test scripts that set up a sample table partitioning environment. These scripts demonstrate gotchas to look out for and the cool features that can dramatically change your database's performance.

Read more about SQL Server Table Partitioning Tutorial: Videos and Scripts 70 comments — Join the discussion
Production DBA

The Trouble with Keys

Scaling up is hard: big hardware gets expensive fast. Scaling out is equally difficult; interesting design problems creep in to scale out solutions. One of the more troublesome issues architects face when scaling out is the issue of distributing identity. It's often advantageous for object identity to be unique and portable across all database instances…

Read more about The Trouble with Keys 22 comments — Join the discussion

Potential Problems with Partitioning

Getting started with table partitioning is difficult; there are many decisions to make after you've decided to partition data. Correctly configuring partitioning is critical to the long term performance and stability of the database from both a querying and data modification standpoint. There are three key considerations that database architects should devote time to before embarking on a partitioning implementation: the design of the partitioning key, a thorough study of querying practices, and an examination of data modification practices.

Read more about Potential Problems with Partitioning Be the first to comment
Production DBA

Hash Partitioning, SQL Server, and Scaling Writes

At first glance, SQL Server’s partitioning seems like it should be an easy way to solve problems inserting data into busy tables. If the writes are spread across many partitions it only makes sense that we can avoid write hot spots in SQL Server, right? The truth is much more complicated than it appears. Asking…

Read more about Hash Partitioning, SQL Server, and Scaling Writes 18 comments — Join the discussion

How Fast Does Your SAN Need to Be for SQL Server?

Let's oversimplify the bejeezus out of this complex problem.  Suspend your disbelief for a second and work with me:

We have a database server hosting just one 100GB table.  Sure, in reality, we've got lots of databases and lots of tables, but we're going to keep this simple.  We've got a simple sales table that stores a row for each sale we've ever had.  We don't have any indexes: this is just 100GB of raw data in our clustered index.

Read more about How Fast Does Your SAN Need to Be for SQL Server? 9 comments — Join the discussion

How To Decide if You Should Use Table Partitioning

Great volumes have been written about table partitioning. It’s a complex feature and you can read for days to just understand how you might apply it. But will it improve performance for you? Table partitioning produces great benefits for some applications, but causes giant headaches for others.

How do you know if you should invest your time in table partitioning?

Read more about How To Decide if You Should Use Table Partitioning 160 comments — Join the discussion
Performance Tuning

Kendra Little Explains How to Design Smarter Indexes

How do you know which indexes to create to improve your database performance? Microsoft Certified Master Kendra Little shows you how to find a missing index, decide on the best index definition, and measure the usefulness of your new index. If you know the basics of what a database index does and want to learn the smart way to design indexes, this talk is for you.

Read more about Kendra Little Explains How to Design Smarter Indexes 23 comments — Join the discussion