Tuesday, April 23, 2013

Introduction to Hadoop

Here is a short presentation that I gave as a guest speaker to a group of graduate level statisticians at the University of Utah. It is a very high level view of what Hadoop is, who is using it, when you should use it, and bit on how it works.

SQL Server - Index Defragmentation Stored Procedure

I don't remember who wrote the original code for this stored procedure; however, I found it useful enough I wanted to share it with my readers.

The following script does a fantastic job of allowing the user to defragment table indexes with a high degree of control. I have tested the procedure with SQL Server 2008 and 2008 R2. Your mileage on other versions of SQL Server may vary.

Example:

EXECUTE dbo.IndexDefrag
             @ExecuteSQL           = 1
            ,@PrintCommands        = 1
            ,@DebugMode            = 1
            ,@PrintFragmentation   = 1
            ,@ForceRescan          = 1
            ,@MaxDopRestriction    = 1
            ,@MinPageCount         = 8
            ,@MaxPageCount         = NULL
            ,@MinFragmentation     = 1
            ,@RebuildThreshold     = 30
            ,@DefragDelay          = '00:00:05'
            ,@DefragOrderColumn    = 'page_count'
            ,@DefragSortOrder      = 'DESC'
            ,@ExcludeMaxPartition  = 1
            ,@TimeLimit            = NULL
            ,@Database             = 'sandbox,sandbox_caseSensitive';

Source: