I have two tables Purchase Order Header and detail, with 1: n relationship from POHeader to PODetail. This has been implemented in the system using Foreign key.
There are about 10 million records in PO Header, out of which more than 50% of them have status as "closed" and maintained in the system for some legal/reporting requirements.
I want to split this POHeader table horizontally based on the Order status. This would improve the performance of the system as, most of the functionality is built around "Open" Orders.
If i split this into 2 tables, how do i enforce the constraint in PODetail (as u cannot have relationships from both tables- POHeaderOpen and POHeaderClosed)