SQL Server Common Table Expression vs Temp Table
In this tip we look at how to use Common Table Expressions CTE in SQL Server including the syntax, use cases, using more than 1 CTE at the same time and recursive CTEs with a parameter.
2019-06-04
In this tip we look at how to use Common Table Expressions CTE in SQL Server including the syntax, use cases, using more than 1 CTE at the same time and recursive CTEs with a parameter.
2019-06-04
In my T-SQL code I always use set based operations. I have been told these types of operations are what SQL Server is designed to process and it should be quicker than serial processing. I know cursors exist but I am not sure how to use them. Can you provide some cursor examples? Can you give any guidance on when to use cursors?
2019-05-31
When it detects a deadlock, SQL Server will, by default, pick the process the has the lowest cost to rollback. This can present a potential issue if the process is a business critical process. The DEADLOCK_PRIORITY allows us to have a bit of control over whether or not a process is chosen as the victim.
2019-05-31
On my machine, code that calls SYSDATETIME() 10 million times in a loop takes about 11.6 seconds to execute, while with SYSUTCDATETIME() it takes 4.3 seconds. Why is SYSUTCDATETIME() so much faster than SYSDATETIME()?
2019-05-31
2019-05-22
2019-05-22
Hunt down this stuff before stuff starts to break!
2019-05-20
2019-05-16
2,327 reads
The purpose of this query is to find identical duplicate non-clustered indexes i.e. indexes on same table with same columns in same order. If you have a need to...
The...
2019-05-15
How to delete data efficiently When we delete data from a table in SQL Server, we can often find that the delete is slower than even the original insert,...
The...
2019-05-15
By Steve Jones
I’m starting a long trip at Boston this weekend. I’ll be there Saturday speaking,...
As a data & AI strategist who’s seen countless projects succeed and fail, I...
By SQLPals
Set Theory vs. Batch Mode in SQL Server Not long ago,...
Experts, I am hoping to get some help and feedback. I have a server...
Comments posted to this topic are about the item Single User SQL Server on...
Comments posted to this topic are about the item All the Costs of Downtime
How can I start SQL Server on Linux in single-user mode to restore the master database?
See possible answers