Forwarded records are a mechanism that SQL Server employs to reduce the amount of maintenance work for indexes on a table without a clustered index. During an update of a record in a table that does not have a clustered [more…]
Transaction Management The question where in the call stack a transaction should be managed, is similar to the one where errors should be handled. There are several strong reasons to push the transaction management as high up the stack as [more…]
Abstract In this session we will examine one of SQL Servers’ most fundamental yet most important functions – how does SQL Server store data on disk and how does it find it again when executing a query. Using a combination [more…]
I just ran into this question on StackOverflow: Dump data into single XML file from MS SQL Server 2008 R2. In there Daniel is looking for a solution to export his database as an XML file. I thought that request [more…]
T-SQL Tuesday #26 is hosted by David Howard (blog|twitter). This month’s topic is “Second Chances”. Index Misconceptions The topic this month is “Second Chances” which means that we can write about anything, we would have liked to write about before [more…]
T-SQL Tuesday #25 is hosted by Allen White (blog). This month’s topic is “SQL Server Tips and Tricks”. Transaction Log Reuse Wait One question that keeps coming up in forums, at user group meetings and on twitter is: Why is [more…]
Exciting news! Red Gate is now shipping SQL Test, a graphical UI for tSQLt. tSQLt is a Database Unit Testing Framework for SQL Server that was developed by Dennis and me. SQL Test integrates with SSMS and allows you to [more…]
The SQL Server 2012 Release Candidate 0 is now available for download! If you have not started looking at the next version of SQL Server, now is the time to do so. If you are upgrading from CTP3, check out [more…]
A lot has been written about the performanmce impact of functions.
Amongst other effects, functions used in a WHERE clause will prevent the use of an index seek for the columns involved.
Sometimes however it makes sense to use functions to encapsulate a complicated calculation or to make code reuse possible.
It is therefore important that to understand just how big the impact is, that functions have on queries.
I would like to use this blog post to look at the call overhead of different kinds of functions in SQL Server.
There are a few queries agains the DMVs that return execution plans in XML format. This is an example that lists the 10 the execution plans currently in cache that take up the most memory: [sql] SELECT TOP ( 10 [more…]