Thought I'd share a cool trick I picked up a while back with the OVER() clause. Typically you’d use this clause with the PARTITION BY or ORDER BY arguments with the ranking functions released with SQL Server 2005. The OVER() clause though can also be used to do aggregations with a SELECT statement without a … Continue reading The OVER() Clause
Tag: SQL Server 2008
Search Cache For Execution Plans
Updated content at - Really Search Cache For Execution Plans Sometimes when I am working with clients I need to take a look at execution plans for different stored procedures. Rather than digging around with SQL Profiler or executing the stored procedures with what I think might be the parameters I like to '”return to the … Continue reading Search Cache For Execution Plans
Find Duplicate Foreign Keys
A few weeks back I was working on a process that would utilize foreign keys to crawl from table to table to export data from a production database to an archive database. More on some of what went into that process probably at some point in the future. When the project was released to production … Continue reading Find Duplicate Foreign Keys
Scripting Object Level Permissions
A while ago while making changes to a client database, I needed to determine all of the object level permissions that were in the database I was working on. The system stored procedure sp_helprotect turned out to be pretty useful in obtaining this information. The procedure accepts four parameters: They do pretty much what would … Continue reading Scripting Object Level Permissions
MSDN Post: OPTIMIZE FOR UNKNOWN
A good performance tuning trick in SQL Server 2008 from the SQL Programmability team and a response reminding everyone that it isn't a silver bullet from Joe Sack. While cool, this item doesn't count towards my blogging goal for the year. Too bad, still a cool thing to play with.
SQL Server 2008 Consolidation Virtualization
Charley Hanania discusses consolidation and virtualization with SQL Server 2008.
Where’d Report Designer Preview go!?
If you are like me and have been toying around with Report Designer (aka Report Builder 2.0), you may have noticed that it disappeared with RC0 and RTM. Unfortunately, the RC0 version is the only version currently available and even more unfortuantely, if you haven't downloaded it already you are out of luck. I am … Continue reading Where’d Report Designer Preview go!?
Find The Heap Indexes
I'm generally a convert to the congragation that all tables should have clustered indexes. It makes sense, helps performance, and in most cases is the best starting point for a tables. If you aren't part of the community of the faithful on clustered indexes, please read Kimberly Trip's blog on clustered indexes. There are other … Continue reading Find The Heap Indexes
Index Size and Usage
Thought I'd share something I threw together for a client today. They were looking for index a list of indexes in a database with their associated sizes and usage. Using this WHERE statement allowed them to identify 38GB of index space that was being allocated unnecessarily for indexes.
AUTO_UPDATE_STATISTICS_ASYNC SQL Server Database Configuration
I've been looking into the AUTO_UPDATE_STATISTICS_ASYNC option for SQL Server lately and found a couple decent articles on there on it. AUTO_UPDATE_STATISTICS_ASYNC SQL Server Database Configuration Asynchronous Update Statistics Preventing the blocking of queries in OLTP environment from statastic updates seems like a good thing.