• Skip to main content
  • Skip to primary sidebar

DBA Diaries

Thoughts and experiences of a DBA working with SQL Server and MySQL

Differences Between TRUNCATE TABLE and DELETE

May 19, 2013 by Andy Hayes 3 Comments

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

May 14, 2013 by Andy Hayes Leave a Comment

dbcc freeproccache clear sql server plan 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

January 13, 2013 by Andy Hayes Leave a Comment

reduce oledb wait type

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?

January 12, 2013 by Andy Hayes 2 Comments

"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

December 4, 2012 by Andy Hayes 10 Comments

cxpacket wait type parallelism

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

« Previous Page
Next Page »

Primary Sidebar

Categories

  • All Articles (84)
  • Career Development (8)
  • MySQL Administration (18)
  • MySQL Performance (2)
  • SQL Server Administration (24)
  • SQL Server News (3)
  • SQL Server Performance (14)
  • SQL Server Security (3)
  • SQL Tips and Tricks (21)

Top 10 Popular Posts

  • Using sp_change_users_login to fix SQL Server orphaned users
  • MySQL SHOW USERS? – How to List All MySQL Users and Privileges
  • How to shrink tempdb
  • How to Transfer Logins to Another SQL Server or Instance
  • How to Delete Millions of Rows using T-SQL with Reduced Impact
  • T-SQL – How to Select Top N Rows for Each Group Using ROW_NUMBER()
  • New T-SQL features in SQL Server 2012 – OFFSET and FETCH
  • How to Kill All MySQL Processes For a Specific User
  • Using exec sp_who2 to help with SQL Server troubleshooting
  • How to fix “conversion failed when converting date and/or time from character string”

Recent Posts

  • How to fix “conversion failed when converting date and/or time from character string”
  • Using SQL GROUPING SETS for Multiple GROUP BY Queries in a Single Query
  • How to Setup MySQL Master Master Replication
  • How To Use SQL to Convert a STRING to an INT
  • How to set up MySQL Replication Tutorial

Search

Connect

  • Twitter
  • Facebook
  • RSS

About

  • Cookie Policy
  • Disclaimer
  • About
Copyright ©