Partitioned Tables: Rolling/Rotating/Round-Robining Partitions
I recently received a terrific question about options for “rotating” table partitions.
I recently received a terrific question about options for “rotating” table partitions.
Table partitioning makes execution plans a bit more confusing.
I have a free online course which walks you through decoding execution plans, including whether or not partition elimination occurred.
Sometimes you need to script out all the indexes in a database. Maybe you’re concerned something has changed since they were last checked in. Or maybe the indexes aren’t checked into source control, and you’re working on fixing that. (Important!)
Either way, sometimes you need to do it, and it’s not fun through the GUI. I needed to write some fresh demo code for this recently, and I needed it to give the details for partitioned tables using data compression, and I thought I’d share.
@SQLSista asked a fun question on Twitter recently about how to figure out the partitioning key on an existing table:
Bad Partitioned HEAP predates me. No clustered index, Primary Key on ID column and multiple datetime columns. How to find the partitioning key? #sqlhelp
Over the years I’ve gotten lots of emails and questions from students that start like this:
Help! My partitioned table has the wrong data in a partition! It’s lopsided. I started trying to fix it, but…
Working with table partitioning can be puzzling. Table partitioning isn’t always a slam dunk for performance: heavy testing is needed. But even getting started with the testing can be a bit tricky!
Here’s a (relatively) simple example that walks you through setting up a partitioned table, running a query, and checking if it was able to get partition elimination.
I’m Talking About Partitioning!
Copyright (c) 2025, Catalyze SQL, LLC; all rights reserved. Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.