SQL Server 2008 Test Ride (Part 2)

9 בדצמבר 2008

אין תגובות

This is my second post about some of the performance improvements you will experience when upgrading to SQL Server 2008 and Visual Studio 2008 SP1.

In this one we will be taking FILESTREAM for a test ride.

During my session at Developer Academy 3 I will be describing how this new feature in SQL Server 2008 can be leveraged from Visual Studio 2008 (SP1) to provide the data integrity and manageability of SQL Server with the access speed of an NTFS file.

In preparation, I decided to measure the performance of FILESTREAM using the project attached to this post.

The project compares the reading and writing speeds to and from a BLOB using three methods:

  1. NTFS:
    Reading and writing from a plain vanilla NTFS file. This method is used when BLOBs are stored on the file system and only their URLs are stored in the database.
  2. SQL Server 2005:
    Reading a BLOB from the database using DataReader in SequentialAccess mode. Writing a BLOB using the TEXTPTR and UPDATETEXT SQL Commands.
  3. SQL Server 2008:

Speeds are calculated as the throughput in bytes per second of reads/writes of 100 blocks of 102400 bytes each.

The following table presents the average and standard deviation of these speeds over 100 repetitions:


Using the code:

  1. You must be using SQL Server 2008 and Visual Studio 2008 SP1.
  2. Download the code from the bottom of this post.
  3. Run the RunThisFirst.sql against the server.
  4. Modify the connection string in the project Settings.
  5. F5
  6. The code should be self-explanatory, but let me know if not.


  1. Comparison to NTFS:
    FILESTREAM is as fast as NTFS on writes and about 10% slower than NTFS on reads.
  2. Comparison to BLOB technologies on SQL Server 2005:
    FILESTREAM improves throughput by a factor of 45 for writes and 7 for reads.

See you on Monday !

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *