Question about document library/folder limitations for a large number of files

%3CLINGO-SUB%20id%3D%22lingo-sub-3002732%22%20slang%3D%22en-US%22%3EQuestion%20about%20document%20library%2Ffolder%20limitations%20for%20a%20large%20number%20of%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3002732%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20know%20SharePoint%20Online%20lists%20hit%20some%20limitations%20and%20reduction%20in%20features%20when%20the%20list%20gets%20over%205%2C000%20entries.%20The%20searching%20and%20filtering%20gets%20limited.%20Does%20this%20also%20happen%20for%20document%20libraries%3F%20I'm%20wondering%20how%20this%20specific%20setup%20would%20be%20affected%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EDocument%20Library%3COL%3E%3CLI%3EFolder%201%3COL%3E%3CLI%3Esub%20folder%201a%3COL%3E%3CLI%3E2%2C000%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3Esub%20folder%201b%3COL%3E%3CLI%3E1%2C100%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3Esub%20folder%201c%3COL%3E%3CLI%3E2%2C000%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3EFolder%202%3COL%3E%3CLI%3Esub%20folder%202a%26nbsp%3B%3COL%3E%3CLI%3E1%2C000%2B%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3Esub%20folder%202b%3COL%3E%3CLI%3E1%2C000%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3CLI%3Esub%20folder%202c%3COL%3E%3CLI%3E2%2C000%20files%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20the%20entire%20document%20library%20reach%20that%205%2C000%20limitation%20when%20the%20any%20combination%20of%20folders%2Fsubfolders%20total%205%2C000%20files%3F%20Or%20does%20it%20happen%20only%20at%20the%20Folder%20level%3F%20Or%20only%20at%20the%20sub%20folder%20level%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3002732%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Efiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3002809%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20about%20document%20library%2Ffolder%20limitations%20for%20a%20large%20number%20of%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3002809%22%20slang%3D%22en-US%22%3EHi%2C%20you%20are%20referring%20to%20the%20ListViewThreshold%20which%2C%20as%20you%20say%2C%20is%20limited%20to%205%2C000%20items%20per%20list%20or%20library%20view.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20the%20scenario%20above%2C%20creating%20multiple%20subfolders%20is%20effectively%20partitioning%20the%20library%2C%20meaning%20that%20at%20any%20given%20level%20in%20the%20folder%20structure%2C%20as%20long%20as%20you%20don't%20have%20more%20than%205%2C000%20items%20(files%20or%20folders)%20at%20that%20level%2C%20then%20you%20will%20be%20fine.%20Where%20you%20would%20have%20trouble%20is%20if%20you%20created%20a%20view%20that%20flattened%20the%20folder%20structure%2C%20returning%20for%20instance%20all%20documents%20ordered%20by%20most%20recent%20created%20date%20across%20all%20folders...that%20would%20throw%20a%20ListViewThreshold%20error.%3CBR%20%2F%3E%3CBR%20%2F%3EFYI%2C%20if%20you're%20browsing%20the%20library%20via%20the%20modern%20library%20experience%20then%20the%20threshold%20is%20increased%20to%2C%20as%20far%20I'm%20aware%2C%2020%2C000%20items.%20If%20you%20are%20using%20the%20classic%20experience%2C%20or%20some%20alternative%20method%20to%20query%20such%20as%20programmatically%2C%20then%20it%20would%20again%20revert%20back%20to%205%2C000.%3CBR%20%2F%3E%3CBR%20%2F%3EIt's%20worth%20noting%20separately%20that%20although%20the%20above%20may%20work%20from%20a%20threshold%20perspective%2C%20if%20you%20are%20expecting%20to%20store%20that%20volume%20of%20files%20in%20a%20single%20library%2C%20you%20need%20to%20consider%20what%20happens%20if%20someone%20chooses%20to%20sync%20the%20whole%20library.%20OneDrive%20has%20its%20own%20limitations%2C%20in%20that%20if%20you%20try%20and%20sync%20a%20library%20(or%20even%20or%20a%20subfolder%20within%20a%20library)%20that%20has%20more%20than%20100%2C000%20items%20you%20will%20start%20to%20experience%20some%20serious%20performance%20impacts.%20If%20there%20is%20an%20option%20for%20you%20to%20create%20multiple%20document%20libraries%20at%20the%20first%20layer%20of%20the%20structure%2C%20instead%20of%20a%20single%20library%20with%20folders%2C%20this%20will%20reduce%20the%20likelihood%20of%20users%20simply%20syncing%20everything%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello,

 

So I know SharePoint Online lists hit some limitations and reduction in features when the list gets over 5,000 entries. The searching and filtering gets limited. Does this also happen for document libraries? I'm wondering how this specific setup would be affected:

 

  1. Document Library
    1. Folder 1
      1. sub folder 1a
        1. 2,000 files
      2. sub folder 1b
        1. 1,100 files
      3. sub folder 1c
        1. 2,000 files
    2. Folder 2
      1. sub folder 2a 
        1. 1,000+ files
      2. sub folder 2b
        1. 1,000 files
      3. sub folder 2c
        1. 2,000 files

 

Would the entire document library reach that 5,000 limitation when the any combination of folders/subfolders total 5,000 files? Or does it happen only at the Folder level? Or only at the sub folder level?

 

Thanks!

2 Replies
Hi, you are referring to the ListViewThreshold which, as you say, is limited to 5,000 items per list or library view.

In the scenario above, creating multiple subfolders is effectively partitioning the library, meaning that at any given level in the folder structure, as long as you don't have more than 5,000 items (files or folders) at that level, then you will be fine. Where you would have trouble is if you created a view that flattened the folder structure, returning for instance all documents ordered by most recent created date across all folders...that would throw a ListViewThreshold error.

FYI, if you're browsing the library via the modern library experience then the threshold is increased to, as far I'm aware, 20,000 items. If you are using the classic experience, or some alternative method to query such as programmatically, then it would again revert back to 5,000.

It's worth noting separately that although the above may work from a threshold perspective, if you are expecting to store that volume of files in a single library, you need to consider what happens if someone chooses to sync the whole library. OneDrive has its own limitations, in that if you try and sync a library (or even or a subfolder within a library) that has more than 100,000 items you will start to experience some serious performance impacts. If there is an option for you to create multiple document libraries at the first layer of the structure, instead of a single library with folders, this will reduce the likelihood of users simply syncing everything
Thank you for the response!

Good to know that it treats it as each folder being its own level. I'm not sure what you mean by the view that would flatten the folder structure. Could you elaborate on that?

As for syncing, I am going to discuss that with the person in charge of the request and see how they want to handle it. Currently just doing an initial setup to get ideas.