What If You Need to Index a Lot of Duplicate Data?
Let’s get a little nerdy and look at database internals.
2025-02-24
Let’s get a little nerdy and look at database internals.
2025-02-24
Accelerated Database Recovery (ADR) is a database-level feature that makes transaction rollbacks nearly instantaneous. Here’s how it works.
2025-02-19
Let’s start with the Stack Overflow database (any size will work), drop all the indexes on the Users table, and run a delete:
2024-11-11
Learn about the ways in which you might better manage indexes for a better performing and efficient database.
2024-11-11
4,148 reads
In this article, we look at a SQL Server Dynamic Management View (DMV) that helps find queries that trigger missing index recommendations.
2024-10-18
This tip covers the differences and similarities between SQL Server index rebuild and index reorganize operations.
2024-09-30
2024-09-27
415 reads
2024-09-20
447 reads
2024-09-13
162 reads
I’m not the first person to write about cleaning up unused or redundant indexes.
2024-08-16
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers