What is the best way to enumerate all SPWebs in an SPSite and also to enumerate folders within document libraries within each of the SPWebs? (essentially I want to find out the urls of all SPWebs, and the number of folders and amount of data being stored in each).
I have achieved the above in C# using the SharePoint API but that takes a long time to run. It seems like the sort of thing that would be perfectly suited to an SQL query, but I understand that that wouldn't be recommended, but surely?! Does anyone have any SQL to achieve the above?