Paul White

14.1K posts

Paul White banner
Paul White

Paul White

@SQL_Kiwi

I live in Aotearoa New Zealand and write about SQL Server internals at https://t.co/nuZwOWQzHy Microsoft MVP 2011-2022 DBA Stack Exchange Mod 2015-2025

Paraparaumu, New Zealand 가입일 Nisan 2010
154 팔로잉5.2K 팔로워
고정된 트윗
Paul White
Paul White@SQL_Kiwi·
New article: How to Survive a Rollback (when logging) How to ensure log messages are always written to the database, even when a containing transaction rolls back. sql.kiwi/2025/04/surviv…
English
1
4
14
989
@Suriyak
@Suriyak@Suriyakmaps·
On the eve of the 1200th day of war in Ukraine, and with it the end of the second thread, have you had any problems to view this thread as happened with the previous one?
English
16
10
220
24.3K
Paul White
Paul White@SQL_Kiwi·
I don't really understand why anyone is excited about nested CTEs, but if you want to try it on SQL 2025 CTP2 box, enable TF 15320 (session or global). Currently only documented for 'Fabric' whatever that is docs.microsoft.com/en-us/sql/t-sq…
English
1
2
12
908
Paul White
Paul White@SQL_Kiwi·
@sqL_handLe You're a very bad man! Nested views = bad Nested CTEs = good 🤯
English
1
0
6
73
Paul White
Paul White@SQL_Kiwi·
Same here. I was most surprised to see genuinely nested CTEs added. I suppose someone, somewhere must have an absolutely compelling use case. The only upside can I think of otherwise is it would stop people writing the frankly offensive ";WITH"
English
1
0
2
103
Jared Westover
Jared Westover@WestoverJared·
@SQL_Kiwi I've always referred to what the documentation calls sequential CTEs as nested CTEs. I haven't thought much about it, but I don't see a reason for what is termed a nested CTE.
English
2
0
1
120
Paul White
Paul White@SQL_Kiwi·
@Citadel93 It doesn't really add anything new except easier syntax and more obvious feature parity with databases like Oracle, PostgreSQL, and DB2. We've always been able to index suitable non-persisted computed columns.
English
0
0
1
89
MattOates
MattOates@Citadel93·
@SQL_Kiwi My guess this is would be useful in very rare circumstances
English
1
0
0
72
Paul White
Paul White@SQL_Kiwi·
Looks like 'expression indexes' are coming to SQL Server 2025. This is valid syntax on CTP 2 when trace flag 17152 is enabled: CREATE INDEX ix ON MyTable (n * 2); It creates a computed column for you, named e.g. $expression_index_B18729F8A924473FA0DF2CB95D9B2E01.
English
3
4
18
928
Paul White
Paul White@SQL_Kiwi·
@jcoehoorn @kekline It seems to be exactly the same as creating a (non-persisted) computed column, then creating an index on that. A shorthand for that process.
English
0
0
0
58
Joel Coehoorn
Joel Coehoorn@jcoehoorn·
@SQL_Kiwi @kekline So I could use this to, say, index a datetime column by just the date, w/o needing to define the column manually?
English
1
0
0
50
Paul White
Paul White@SQL_Kiwi·
@sqL_handLe Seems to be syntax sugar for doing it all manually. Who knows though before it's finished, released, and documented
English
1
0
2
100
L_  N___
L_ N___@sqL_handLe·
@SQL_Kiwi hm. a feature that, while perhaps easier to utilize in some particular T-SQL code, won’t be as robust as having a regular (non-persisted) computed column with an index?
English
1
0
1
87
Paul White
Paul White@SQL_Kiwi·
Interesting undocumented USE HINTs in SQL Server 2025 CTP 2: * DISABLE_PERFORMANCE_SORT_FOR_DML sets DMLRequestSort to false like TF 8795 * DISABLE_OPTIONAL_PARAMETER_OPTIMIZATION * PARALLEL_DML_FOR_VECTOR_INDEX_BUILD * DISABLE_SCALABLE_SUBTREE
English
0
3
8
546
@Suriyak
@Suriyak@Suriyakmaps·
What do you guys think?
English
14
6
28
11K
Paul White
Paul White@SQL_Kiwi·
This is a really funny SQL Server bug dbfiddle.uk/iUmhLPln DECLARE @T table (i smallint NOT NULL PRIMARY KEY); INSERT @T (i) VALUES (256); SELECT TRY_CONVERT(tinyint, T.i) FROM @T AS T; SET STATISTICS XML ON; -- Oops! SELECT T.i FROM @T AS T WHERE TRY_CONVERT(tinyint, T.i) IS NULL;
English
1
4
13
747
Aaron Morelli
Aaron Morelli@sqlcrossjoin·
@SQL_Kiwi @erikdarlingdata , random Q, but do either of you use "PKM" (Personal Knowledge Management) tools for managing the vast amounts of obscure details you accumulate in your careers? (e.g. Logseq, Obsidian, Roam Research)
English
1
0
1
262
Paul White
Paul White@SQL_Kiwi·
New article: Recording Debugging Information Inside a SQL Server Function Call We cannot use PRINT or RAISERROR statements within a T-SQL function body for debugging purposes. This article presents a workaround using session context. sql.kiwi/2025/04/debug-…
English
1
4
16
803
Paul White
Paul White@SQL_Kiwi·
FYI my rates for US residents have increased by 25% from today
English
1
0
12
529
Paul White
Paul White@SQL_Kiwi·
New article: Accessing a SQL Server Table Variable in a Different Scope Two ways to access a SQL Server table variable outside its declaration scope. sql.kiwi/2025/04/access…
English
0
4
13
707