I have a legacy application which queries one of its database (MySQL on AWS Aurora) tables extensively. Lots of queries and lots of query types. 90% of the rows in this table are outdated and are marked
is_deleted. I want to try and make the performance better so I thought of partitioning the table by
is_deleted and making all queries go to the partition where
is_deleted=false. The problem is that there are many hundreds, if not thousands, of queries I'd need to rewrite in order to insert
is_deleted to the
where clause of every query.
Is there a way to define the
is_deleted = false partition as the default for all reads? If not is there some other way to do this?