Removing orphaned block and area content after mass page deletion
After deleting the pages from the sitemap and reindexing the page search index, there are still a substantial number of rows left in the areas, collectionversionblockpermissions, collectionversionblocks, btcontentlocal, etc tables. Is there a process somewhere in the system designed to permanently purge orphaned areas and blocks from the database? If not, does anyone have a series of queries which would perform the same function?
The problem I was having was deleted blocks were still showing in search results. In the end I ended up having to search through the mysql database file and manually delete the old content. But there might be some other ideas on that page that could work for you.
It looks like collectionVersionBlocks ties the collections cID to the block bID, but i'm worried about deleting records from this and the block tables based solely on this relationship in case there are other considerations to take into account (scrapbooks, etc).