I revisit an old post and explores approaches to calculating the median across partitioned sets.
SQL Server
I follow up on a running totals post with an article describing different ways to achieve the same types of results for more complex grouping and aggregation.
I demonstrate how IDENT_CURRENT cannot be relied upon for reporting your new IDENTITY value, even under SERIALIZABLE.
I talk a little more about in-memory table-valued parameters, and explains why some scenarios you test may not demonstrate the power of this technology.
I explained how I justified purchasing a new Mac Pro, and show that it is very tough to order a comparable PC at similar price points.
I highlight a couple of potential problems discovered in various AdventureWorks-based In-Memory OLTP samples out there, and how to work around them.
After an initial look at in-memory TVPs at small scale proved promising, I take a closer look at trying to match more values against a much larger table.
I investigate a deadlock issue with alias types and table-valued parameters, and the Connect items that have sprung up about this issue.
Tip : Script to Set the SQL Server Database Default Schema For All Users
I discuss a common requirement, generating random numbers to serve as surrogate keys, and show how you can avoid the incremental cost of preventing collisions.
Tip : Generating Random Numbers in SQL Server Without Collisions
I investigate a case where two different methods of deriving an inline constant can lead to very different cardinality estimates.
I discuss a case where assumptions can lead to a poorly-performing query and where exploring other options can pay off.
I reflect on the presentation I gave during the PASS Performance VC Summer Performance Palooza 2013 on June 27th, including responses to Q & A.
I explore a few additional places to get information useful for decisions about creating new indexes that are suggested as "missing" by various tools.
Tip : Extend DDL Triggers for more functionality: Part 2
I talk about a subtle way that ad hoc queries can interfere with SQL Server performance by taking up more space in the plan cache than they really need.
Tip : Extending SQL Server DDL Triggers for more functionality: Part 1
I go into a little more detail about what happens to metadata when you use schema transfers behind the scenes.
I discuss some obstacles he recently encountered when configuring an Availability Groups lab environment and how some assistance from the community helped me isolate and solve the issues.
I explore a couple of advantages and a hefty list of limitations with filtered indexes in SQL Server 2008 and above, with links to no less than 36 Connect items.
I discuss ways to optimize large delete operations, both to make them faster, and to minimize impact on the transaction log.
See how you can protect your execution plans with a free PowerShell script from Jonathan Kehayias of SQLskills.
I had a great time at the MVP Summit last week. Caught up with a lot of friends, tried some new foods, and took in some great technical sessions.
Tip : Move all SQL Server indexed views to a new filegroup
There is an important MERGE
"wrong results" bug, involving indexed views, that could be affecting your queries right now.
In part 3, I shift focus to generating sequences of dates.
In this installment, I talk about the next level of scale: generating sets of 50,000 and 1,000,000 numbers.
I discuss ways to generate a contiguous set of numbers from 1 to 1,000.
I talk about some potential inefficiencies here that you might not notice on low volume sites but that will start to affect performance as your web volume ramps up.
I dig into the left anti semi join, comparing NOT IN, NOT EXISTS, OUTER APPLY, EXCEPT, and OUTER JOIN methods.
I discuss several aspects of DBCC CHECKDB and offer suggestions to minimize the impact this crucial operation can have.
A lot of work went into improving estimates shown by an execution plan in Plan Explorer.
STATISTICS IO might not always tell the whole truth about data being read to process a query.
I follow up on an earlier post about trimming time from datetime, this time examining the performance characteristics of various methods without data access.
I show several reasons why you should stop using the sp_ prefix on stored procedures in SQL Server, including a (minor) performance hit.
See if there is anything to gain by checking first if a particular column should be updated.
Hit-highlighting is a feature that many people wish Full-Text Search would support natively. See possible solutions.
I talk about the default cursor options in SQL Server and why you may want to override them.
Your data type choices can sometimes have more impact than you think.
Tip : Build a quota system for SQL Server user defined tables
I share my slide deck and some photos from SQL Saturday #162 in that Cambridge.