I have an issue where my SharePoint document folder has an issue with the list view threshold. It has 193757 items (list view threshold is 5000). However, what I do not understand is that these documents are all stored within folders and the actual list should never list more than maybe 100 items at a time. Is there a setting I am missing? I'm using SharePoint online.
The List View Threshold states that you cannot have more than 5,000 items (by default) returned in your list view. So it really does not matter if you have stored them in a folder or not.
Each List view should not return more than 5000 items as this limitation comes from SQL server where SharePoint stores it's data in a table. So it'd better to re-plan structure such that each list view should not have more than 5000 items.
You can have a look on the below link to have a better understanding on List view threshold.
I hope this helps.
Indeed, folders should act as filters and the List View Threshold (LVT) should not be violated if you have just a few items inside a folder.
Check the view settings to see if there are any custom settings that could violate the LVT in the background. In particular, check if the "Folder and Flat" setting that is collapsed into the "Folders" section is set to "Show items inside folders". I've seen instances of LVT violation when this setting was set to "Show all items without folders".
You can also first create a new vanilla view to see if things work as expected and then compare the new view with the one applied to your library to find the faulty setting.