How many heap tables do you have? :Quick Tips
Nothing exciting, just a general script. How can you see what heaps you have laying around?
exec sp_MSforeachdb @command1 ='
use [?]
SELECT...
2013-11-22
896 reads
Nothing exciting, just a general script. How can you see what heaps you have laying around?
exec sp_MSforeachdb @command1 ='
use [?]
SELECT...
2013-11-22
896 reads
This is a little excessive, but here's a quick script to show you your fill factors per table that are...
2013-11-21
915 reads
What? You want to see all of your data? Well do I have the script for you! New, Improved, Extra...
2013-11-20
462 reads
Let's look at something a bit more in depth. Let me start by saying, "Please don't arbitrarily change any default...
2013-11-25 (first published: 2013-11-19)
2,238 reads
So Friday we were discussing the idea of an idea. I think... or an idea of an idea's idea. What...
2013-11-18
1,004 reads
Like all the arbitrary numbers we hear in the SQL community such as the 30% fragmentation and 1000 pages. These...
2013-11-15
746 reads
This is a project I've been working on for a while. The information is all there... how it's queried may...
2013-11-14
506 reads
This isn't a normal post. This one is directed to newer people, those who feel pushed around a bit at...
2013-11-13
395 reads
Fragmentation can cause issues for performance to the point of having queries not resolve at all. Your normally scheduled maintenance...
2013-11-12
432 reads
A while back I saw a wonderful article on BrentOzar.com by Kendra Little. In the comments, Aaron Morelli mentioned that...
2013-11-11
443 reads
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