Q:

Any benefit to deleting a soft-deleted row in MySQL?

I have a table in MySQL dB that records when a person clicks on certain navigation tabs. Each time it will soft-delete the last entry and insert a new one. The reason for soft-delete is for analytics purposes, so I can track over time where/when/what users are clicking. The ratio of soft-deletes to new entries are 9:1, and the table size is about 20K at the moment but growing fast.
So my question is: if deleting the soft-delete entries would help optimize any queries that involve this table? There is one at the moment that joins 4 tables together and only needs the new entries. Since the analytics on the soft-deletes could be performed on backup copies, I don't need these rows on the production dB.

A:

There is most likely a performance implication to have 90% of your table excluded out of all queries but the analytics: your indexes are probably bigger than they would be if these soft-deleted rows were in their own table, the disk head has to seek across bigger distances so your disk accesses are more expensive than they would be in table 1/10 the size etc.

