DIFF.BLOG
New Following Discover Jobs
More
Top Writers Suggest a blog Upvotes plugin
Report bug Contact About
Sign up
Topics
Follow your own topics →
Menu
New Following Discover Jobs Top Writers
More
Suggest a blog Upvotes plugin Report bug Contact About
Sign up
The home for great developer writing.
We surface the best developer writing from thousands of independent blogs, updated daily.
Join Diff.blog
TOPICS

When CTEs Don’t Work, Try Temp Tables – #TSQL2sday

133 · Brentozar · Aug. 11, 2026, 1:46 p.m.
T-SQL sql-server Performance Optimization Database Management Common Table Expressions
Summary
This blog post discusses the effectiveness of Common Table Expressions (CTEs) in SQL Server, suggesting that while they are powerful, there are cases where switching to temporary tables yields better performance. It includes an example to illustrate the point.
Read full post on www.brentozar.com →
MORE POSTS LIKE THIS
Database Animations: Why Big Columns May Not Affect Logical Reads
Brentozar · Aug 6, 2026
Database Animations Development
Avoiding SQLite Database Locks in Production
Bendangelo Blog · Jul 4, 2026
sqlite ruby
SQLite improving performance with pre-sort
Andersmurphy · Jun 7, 2026
software development sqlite
The Postgres Developer's Guide to Vector Index Tradeoffs
Timescale · May 26, 2026
pg_textsearch postgresql
Building a basic cache with SQLite
Alex Chan · Apr 29, 2026
sqlite Blogging about blogging
Next Generation DB Ingestion at Pinterest
Pinterest · Feb 5, 2026
pinterest icebergs
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub Continue with Google