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
901 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
901 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
919 reads
What? You want to see all of your data? Well do I have the script for you! New, Improved, Extra...
2013-11-20
465 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,242 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,011 reads
Like all the arbitrary numbers we hear in the SQL community such as the 30% fragmentation and 1000 pages. These...
2013-11-15
751 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
511 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
400 reads
Fragmentation can cause issues for performance to the point of having queries not resolve at all. Your normally scheduled maintenance...
2013-11-12
437 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
445 reads
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
By Steve Jones
Software is hard. While I love our Lucid Gravity, I realize that they are...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers