SF_CHUNKS table size

Posted by Community Admin on 03-Aug-2018 14:10

SF_CHUNKS table size

All Replies

Posted by Community Admin on 14-Oct-2013 00:00

Is there a recommended way to minimize the size of the sf_chunks table?  It is currently around 2 GB, which is half the size of our entire DB.  Any thoughts or suggestions would be appreciated!

Posted by Community Admin on 14-Oct-2013 00:00

Jared,
I am 99% sure this is where were all BLOBs (Binary Large Objects) are stored in Sitefinity.  Anything you store under Images, Video, or Documents will be stored in the database by default.

One way of reducing the size of this file could be to store these files on the file system.  Any top level library will allow you to change the storage location by going to Actions > Move to another storage.  Select File System and the files will be moved from inside the database to you file system under /App_Data/Storage/FileSystem.  This is the default location but this can be changed.

Hope this helps.

Craig

Posted by Community Admin on 16-Oct-2013 00:00

Hi,

The table sf_chunks contains the binary data for the uploaded documents on the site, each document,  binary data is split into chunks with a certain size stored in this table, the table gets updated when a document is deleted so I suppose the media contents on the site is matching the size of the table and check if this is true execute the query below to check the sizes of all uploaded media content (the size is in bytes).

LibrariesManager manager = LibrariesManager.GetManager();
       var docs = manager.GetDocuments();
       long allDocumentsSize = 1L;
       foreach (var item in docs)
       
           //the size is in bytes
           allDocumentsSize += item.TotalSize;
       
 
       Response.Write(allDocumentsSize.ToString());

As Craig mentions the default location for storing binary data is database and can be changed to file system or external storage provider like dropbox (sample provider for dropbox is available in sitefinity SDK, DropboxLibraries provider), azure storage provider or amazon S3 storage.

Regards,
Stanislav Velikov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 08-Oct-2014 00:00

External Storage option does not work properly. Choosing Azure Storage if you put images in a root level library, and then put images in a sub-library with the same names, Sitefinity puts them both in a folder with the name of the root level library. So you cannot have images with the same name in sublibraries. 

feedback.telerik.com/.../124015-uploading-images-with-the-same-name-in-azure-storage-causes-issues

 

Local file system is not an option for a clustered environment. 

Database storage is expensive, and I'm experiencing large load on queries to sf_chunks table. Some responses are taking up to 30 seconds. Sure would be nice to use Azure Storage and CDN instead.

 

Posted by Community Admin on 09-Oct-2014 00:00

Hello,

I have marked this bug as important for clients and I hope that we will be able to address it soon:

feedback.telerik.com/.../124015-uploading-images-with-the-same-name-in-azure-storage-causes-issues

You could follow the item in order to receive notifications when the status of the items is changed.

Excuse us for the inconvenience.

Regards,
Stefani Tacheva
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed