Quote:
|
Originally Posted by dyip
Can anyone help me with my partition logic for those two tables?
|
tables are partitioned based on values that they contain
presumably, you were looking for a way to partition table 2 into active and non-active rows?
this means you'd have to carry the active column redundantly in table 2
to be honest, i'm not quite sure what would happen when a row in table 1 goes from active to inactive, but you might consider incorporating the active column into table 1's PK and then setting table 2's FK accordingly, with ON UPDATE CASCADE
furthermore--and i'm not sure about this either--i suspect that the table 2 rows would actually have to be moved from one partition to the other
on the whole, my advice is not to go this route until you need to
remember the old saying about "premature optimization"...