As in many databases, i am designing a database that should keep record of previous versions of the rows changed in each table.
The standard solution to this problem is
I would use the IS_LAST=1
partition, and the IS_LAST=0
partition system. Because it is partitioned it will be fast (partition pruning) and you will never have to query a union of the normal table and the history table.
I would use IS_LAST='Y'/'N' and not 1/0. 1 and 0 are meaningless.
There is a special trick that can help guarrantee that there is max one row with IS_LAST='Y'
per entity: You can create a unique function based index with a function that returns null when IS_LAST='N'
and return the id when IS_LAST='Y'
. It is explained here: http://www.akadia.com/services/ora_function_based_index_1.html