Forum Discussion
SamY1992
Oct 10, 2023Copper Contributor
Query with CTE - run time
Hello all (sorry first time posting!), I have a query using CTEs and some days it runs within 6 mins, other days it can take up to 1 hour and I'm not too sure why. Can anyone provide any advice p...
olafhelper
Oct 11, 2023Bronze Contributor
I thought it may be a data warehouse issue
SamY1992 , one cause can be blocking, because an other process heavyly wirte to the table you use in your query.
Determine Which Queries Are Holding Locks - SQL Server | Microsoft Learn