Our merged contacts still have rows in the DB with 'is_deleted' and in other related tables - agree to & start deleting
There are 17 million deleted contacts in our database and 23 million not deleted records so deleted records likely make up half or our contact table, and wmf_donor table and make ‘some sort of dent’ in our activity_contact table. Note deleting these contacts will add rows to the log tables although the lesser indexing in the log tables means it’s not one for one. We would need to do some tests. The biggest chunk of deleted contacts is from 2016 (6 million or more than ⅓) so we could start by removing them and see how it affects other table sizes before deciding how far to go down this path. I believe this will improve our query speed as I suspect the poor indexing choices may be improved.