|
|
|
|
|
by malisper
3573 days ago
|
|
How do you manage the partitioning? We've thought of partitioning events (by time and/or by type of event) but we haven't found an easy way to migrate to partitioned tables and we aren't exactly sure how we would maintain the partitioning. |
|
However if you add columns to your subtables (which is usually the case for adding events by type) you will need to insert into the correct table.
You can enforce this by making it so you can never insert into the parent table
Now you have to insert in the chid tables. This requires business logic on your end.As far as refactoring goes the typically approach is to create the new tables and insert the data into them and then do a name swap and then add the check constraints.