If you want to remove data from a table, you can do this in a couple of ways using TRUNCATE TABLE or DELETE. A common approach is to use DELETE to remove all rows in the table but TRUNCATE TABLE offers an alternative and I will list what the differences between the two are. DELETE [sourcecode language='sql'] --Delete rows with filter DELETE FROM SchemaName.Table … [Read more...] about Differences Between TRUNCATE TABLE and DELETE
Using DBCC FREEPROCCACHE to Clear SQL Server Procedure Cache
It is possible to clear out the entire SQL Server procedure cache using DBCC FREEPROCCACHE The procedure cache is where SQL Server will cache execution plans after they have been compiled. The benefit of this caching is that there is no need for the execution plans to be compiled at run time. This compiling operation typically consumes resource and slows down the execution … [Read more...] about Using DBCC FREEPROCCACHE to Clear SQL Server Procedure Cache
The OLEDB Wait Type and How to Reduce It
In this post, I look at the OLEDB wait type. Books Online lists this as "Occurs when SQL Server calls the SQL Server Native Client OLEDB Provider. This wait type is not used for synchronization. Instead, it indicates the duration of calls to the OLE DB provider." "OLEDB" stands for Object Linking Embedding Database. OLEDB is an API used by SQL Server when retrieving … [Read more...] about The OLEDB Wait Type and How to Reduce It
Have You Set Yourself Any Goals for the New Year?
"New year, new start" - I've heard that saying several times and it could mean the start of many different things. A new diet, a new fitness regime, a new job or complete career change. Giving up a vice, a new qualification, a new life - there will be others I'm sure. I don't usually do new years resolutions but this year I have set myself some new targets and they are … [Read more...] about Have You Set Yourself Any Goals for the New Year?
Reducing SQL Server CXPACKET Wait Type
In my last post, I wrote about how SQL Server schedules tasks to be executed. It's important to be able to understand this when when trying to analyse wait types and statistics in SQL Server. For this post, I will be looking at the CXPACKET wait type and what you can do to reduce it. This is one wait type that can be misjudged. I mentioned before that the wait types … [Read more...] about Reducing SQL Server CXPACKET Wait Type