Information about how queries have been optimized since the server has been restarted. Note that counters are only affected when there is some sort of optimization event, not on every query. (reference: http://sqlserver-qa.net/blogs/perftune/archive/2007/05/11/get-statistics-on-query-plan-optimizer-execution.aspx Read More...

Excellent dmv that shows, for each file that SQL Server uses for the databases, stats on how frequently the file has been used by the database. This is one of the primary dynamic management views I use almost daily (well, not usually when I am on vacation, Read More...

This object gives statistics on how an index has been used to resolve queries. Most importantly it tells you the number of times a query was used to find a single row ( user_seeks ), a range of values, or to resolve a non-unique query ( user_scans ), Read More...

Give space usage of objects in tempdb (most likely this will be extended to more than just tempdb in a future edition of SQL Server.) Can be used to see how and why space is being used in Tempdb, on a file by file basis. Type: View Data: temporal, reflects Read More...

For the current database, gives you space oriented statistics for each partition of indexes (even if you only have one partion), like row count, page counts, etc. Resembles the sysindexes in previous versions of SQL Server, with more information. Type: Read More...

Well, I am working on a project that is going to be a book on dynamic management views (and functions, but DMF is an interesting acronym, and objects, as in DMO, has a well known other meaning. What I will post will be one object in the following format: Read More...

A question came up on the forums the other day that a person wanted to compare two tables of data. Doing this is pretty easy using several techniques: Using EXCEPT Using NOT EXISTS Using a FULL OUTER JOIN First two sample tables which represent two sets Read More...

I was going back through my files of draft blogs for the past 6 months (particularly looking for things that are wrong in my book,) and I found this one that covers something that I found really fascinating.) In this thread , a person was attempting to Read More...

There was a question on the forums the other day that asked how to get a total for the current month, the current quarter, and year to date. It is actually a pretty easy task when using a calendar table. I have one you can use here (I fixed an error in Read More...

I was building a script to build a table I had built in my dev environment including inserts so I did a bit of hunting around and came upon Vyas's script ( http://vyaskn.tripod.com/ ) that is used to generate inserts from a table (script here: http://vyaskn.tripod.com/code/generate_inserts_2005.txt Read More...

I have been struggling to find a way to describe the fundamentals of first normal form for my PASS presentation, and this came to mind last night. SQL works in a very constructive way, meaning that if you have base values (commonly referred to as atomic, Read More...

I was working with the Redgate compare tool today (something I am a big fan of I might add,) using it to take a snapshot of my database so I could drop all code and do a collation change to a database (an article I updated because I discovered a new wrinkle Read More...

This is not a scoop or anything, but it is quite newsworthy. It is also a good way to kick off my sqlblog er...blog: Kalen Delaney - Metadata Power Simon Sabin - object_name() to be extended in SP2 A very common request is to have some of the system functions Read More...