Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. 146 schema migration (spaces cluster)
- safe to run
- 2. 147 schema migration (metric_key_id)
- safe to run
- took 10min on stage
- 3. 148 schema migration (metric_key_name_id, also metric_key_id FK)
- safe to run
- took 1528s on stage
- Per space part:
- 4. 036 data migration (metric_key_names metric_key_id)
- run per space
- took 1536s on stage for 5147 for 75836 records
- **make index and then it will be faster**
- 5. 037 data migration
- run per space
- took 2.4s on stage for 5147 for 75836 records
- **that was with index**
- ## Important as fuck:
- - FK constraint on metric_key_names was dropped after migration finished. It will (and must) be added when all metric_key_names have their respective metric_key_id. And then cascade delete must be added. So
- `ALTER TABLE metric_key_names ADD CONSTRAINT fk_metric_key_names FOREIGN KEY (metric_key_id) REFERENCES metric_keys(metric_key_id);`
- Must also include on delete cascade.
Add Comment
Please, Sign In to add comment