Browse by Tags
All Tags »
SQLServerPedia Syndication (
RSS)
One of my personal pet issues is with inappropriate use of the NOLOCK hint (and read uncommitted) . Don't get me wrong, I have used it in exceptional circumstances , but as a general statement it is a bad thing. Mostly , when NOLOCK, is used the discussion...
Cross apply (and outer apply) are a very welcome addition to the TSQL language. However, today after a few hours of head scratching, I have found an simple issue which could cause big big problems. What would you expect from this statement...
It is widely know that data modifications on table variables do not support parallelism, Peter Larsson has a good example of that here . Whilst tracking down a performance issue, I saw that using the OUTPUT clause also causes parallelism to not be used...
In addition to my previous post , another best practice is to not use NOLOCK and READ UNCOMMITTED transaction isolation level. Here’s an excerpt from a profiler trace BEGIN TRAN UpdateMediaTables SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED DECLARE...
Best practice is to use parametrized queries to enable plan reuse. Will someone please tell Microsoft this. Presently dm_exec_cached_plans on our live server has been bloated by 550mb of adhoc queries by SqlAgent (possibly a few other services...
There seem to be many different methods being suggested to calculate an age in SQLServer. Some are quite complex but most are simply wrong. This is by far the simplest and accurate method that I know. Declare @Date1 datetime Declare @Date2 datetime Select...
After playing around with powershell a bit, I managed to do something quite useful. There are a multitude of ways to capture performance counters but I think this will have the advantage of being able to be fired by SqlAgent (or another timer process...
I’ve put my hand up to to a quick 10 - 15 minute slot at the London user group, so I was getting my scripts together to do a presentation based on my UDF Overhead blog entry. Naturally this being my first time talking, I wanted to make sure that...
When Microsoft first announced that in SQLServer 2000 they were introducing user defined functions, I thought “Excellent, that will really help my system”. However, it soon became apparent that there is a big overhead in calling them...
This is a question that cropped up SQLServerCentral . Imagine you have a list of dates, for which you need to know the next day after a specified interval. So in this list you want to return those with an interval of 3Days (ie those in Red ) 01Jan 02Jan...
More Posts
Next page »