There seems to be tons of arguments whether you should store your Media Library files in the database or as files on disk. I usually prefer storing them in the database, since it’s usually easier to manage the data this way. The performance impact is virtually none anyway, since I always use a CDN. But I agree with many of the cons arguments about this as well, so I’ll leave that decision to you.
If you choose database storage, one thing worth considering, is moving the Blobs table into another file store, so that you can put the binaries on a cheaper disk volume. That is if you for example run your primary database on SSD disks, it’d work just fine having the blobs on conventional hard disks.
Open SQL Server Management Studio and click Properties on your database. In the Files-tab, add a second file and locate it on your preferred volume. In Filegroup, select
Note: If you do this on an existing installation with a lot of data in the Blobs table, make sure you have enough space for the ldf files. You can for example let the log file grow on the volume disk as well during this operation.
Move the Blobs table
There is no simple way to move an existing table into a new volume, and there are quite a few guides on this. SQL Server: Move Tables between Filegroups is a quite nice guide, but I ran into some trouble with this one as well because of collaction conflicts.
Fortunately, I was able to bring the CMS off-line for a while, so I used this simple solution instead:
CREATE TABLE dbo.Blobs2 ( Id uniqueidentifier NOT NULL DEFAULT (newid()), BlobId uniqueidentifier NOT NULL, [Index] int NOT NULL, Data image NOT NULL, Created datetime NOT NULL ) ON Volume TEXTIMAGE_ON Volume GO INSERT INTO dbo.Blobs2 (Id, BlobId, [Index], Data, Created) SELECT Id, BlobId, [Index], Data, Created FROM dbo.Blobs GO DROP TABLE dbo.Blobs GO SP_RENAME Blobs2, Blobs
Remember to do this for both Master and Web database. It’s good to do this in a fresh install as well, since you volume management will be much easier when you have the Blobs table already moved. You can for example have the “Volume” file group on the same disk to start with, and move that one later having the CMS and database online.