How LAG compares to other techniques
LAG pulls a column from another row without a self-join. In this article, Kathi Kellenberger shows how LAG compares to other techniques
2021-09-24
LAG pulls a column from another row without a self-join. In this article, Kathi Kellenberger shows how LAG compares to other techniques
2021-09-24
The SQL Server identity column is used to populate a column with incrementing numbers on insert. In this article, Greg Larsen explains how it works.
2021-09-13
Oracle added several enhancements to the sequence object in version 12c, including an “identity” column feature. Jonathan Lewis explains how to work with these new features.
2021-09-10
During database development, as well as writing SQL, you must also write the tests that prove your SQL code meets all the requirements. The article will help you get started with database testing for your SQL Server databases, by creating and running unit tests against them, as well as static code analysis tests.
2021-08-20
SQL Server perfmon counters provide a wealth of information about performance. In this article, Fabiano Amorim shows how current wisdom about one counter, SQL Compilations/sec, can sometimes be misleading.
2021-08-20
SQL Server provides information for troubleshooting performance. Ed Pollack demonstrates collecting SQL Server performance monitor data.
2021-08-11
DBAs can control many aspects of SQL Server’s behavior with trace flags. In this article, Robert Sheldon explains how to enable SQL Server trace flags.
2021-07-30
The SQL Server transaction log must be managed to keep a database running and performing well. In this article, Greg Larsen explains how to manage the transaction log size.
2021-07-23
Compare the schemas of two SQL Server databases using SQL Compare command line then quickly produce a diff report showing you immediately which tables, views and functions have changed.
2021-07-02
SQL Server performance tuning can seem overwhelming when you don’t know where to start. In this article Robert Sheldon explains 9 best practices for performance tuning.
2021-06-16
By Steve Jones
I recently started playing with the MCP Server for SQL Server, which is a...
If you spend your days tuning queries, managing pipelines, or keeping a production database...
I’ve been rebuilding my three-site SQL Server demo lab, and I ran into something...
Has anyone written a wrapper function (or similar) around STRING_AGG() to allow the retrieval...
Putting this here as we're currently on SQL Server 2019 installed on Windows Server...
Comments posted to this topic are about the item Never is Not the Policy
I have added a few indexes to one of my tables in SQL Server 2025:
ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
PRIMARY KEY (CustomerID);
-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerPhone
ON dbo.CustomerContact (phone);
I then do this to disable one index:
alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disableI see this when I check the index status:
I decide to rebuild all indexes with this command:
ALTER INDEX ALL ON dbo.CustomerContact rebuildAfter I do this, what will I see for the index status? See possible answers