Best practices for storing large amounts of data such as XML in SQL Server

Does anyone have any recommendations that they can use to store data like XML field type in SQL Server 2008? We have many small XML structures, but some larger ones (> 50 MB). We find that on DELETE the situation slows down a bit. Any advice / stories about the war would be appreciated.

+5
source share
5 answers

Another vote outside the database.

In the past, I used an approach similar to what James recommends, but SQL Server 2008 supports the new FILESTREAM storage option, which can store varbinary (max) columns outside the database in NTFS and can be worth a look at.

SQL Books Online , " FILESTREAM".

+3

, .

, . :

  • , , - .
  • , .

varbinary (max). , 10 .

+5

, , , webapp... , , fileID

, , ..

+2

, xml .

, , IMO, . , DLINQ XLINQ XML .

+1

!

, , , , , . , , , .

A large number of management files Most file systems will be good at storing a large number of files together, but they will start to work more slowly over time. I highly recommend making subfolders based on some hash value. For example, if all file names are integers, store 10,000 files in a directory and calculate the name dir as (filename% 10000) * 10000 - you can find the file in the same way when debugging.

+1
source

All Articles