Category: T-SQL

  • TSQL Updating in batches

    When you perform a SQL bulk update, you can just press go and wait. Most humans, though, get an increasing feeling of impending doom when the clock ticks up towards several hours with no visible progress. If you are running a transaction and have other things competing for the table, you’ll start hearing about slow downs as…

  • Sqlserver CPU 100% because of wrong memory estimates​

    Problem: I had a query ( query available down under)  that was filtering the dbo.bla based on a @begindate and @enddate variable. The query took ages and eventually would timeout. When I use a hard value instead of a variable the query would run in 50 seconds. I have tested the query using hard date…