Unique Identifier as Clustered index
This script selects clustered indexes containing only a uniqueidentifier column
2013-10-17 (first published: 2013-10-02)
1,249 reads
This script selects clustered indexes containing only a uniqueidentifier column
2013-10-17 (first published: 2013-10-02)
1,249 reads
This script finds the size of all indexes in a database along with the table and the filegroup on which the index resides.
2013-10-15 (first published: 2013-09-23)
1,901 reads
This script will store all index definitions into a table that you can use to "re-create" the indexes at a later date.
2015-03-11 (first published: 2013-08-26)
3,019 reads
In this article Greg Larsen will show you how to identify when your index statistics were updated last, what method was used to gather statistics, and how to update your statistics.
2013-07-11
3,074 reads
2013-06-14
2,903 reads
Script will give you the list of fragemented indexes.
(For SQL 2005-2008)
2013-06-21 (first published: 2013-05-31)
1,956 reads
Seldom has a SQL Server Service pack had such an effect on database development as when SQL Server 2012 SP1 introduced selective XML indexes. These transform the practicality of querying large amounts of XML data. Seth Delconte demonstrates how and why this feature makes all the difference.
2013-02-06
2,578 reads
Script to reorganize all indexes on all tables in user databases
2013-02-14 (first published: 2013-01-31)
3,295 reads
In earlier installments of this series we looked at T-SQL Performance optimizations along with different T-SQL practices, we can now turn our attention to the second part of this series which is index Tuning
2013-01-30
5,192 reads
A script to get the fragmentation of indexes in a database and then rebuild or reorganise accordingly
2013-02-19 (first published: 2013-01-29)
2,140 reads
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