You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A script to merge positions by some filter (e.g. age) into one has multiple uses:
After a large initial import, a lot of positions are created because the client sends everything as seperate requests. Merging them into one initial position could prove valuable for future performance.
After a lot of work has been done on an instance, very old data may no longer be needed in the history (e.g. older than one month/one year/...). For such an instance, we can merge all positions which are older into one to save space and potentially increase the performance.
This should be able to be done relatively easily by building all models up to the last position to be merged and then creating one CREATE event per model which is used in the single position (and additionally one DELETE event for deleted models). All positions to be merged except one are then deleted and the one which is kept is filled with the new events. This should keep the datastore and the history consistent and also not change any current data.
The text was updated successfully, but these errors were encountered:
The performance gain was only relevant for the old, position-based migrations. The new model-based migrations do not care about the amount of positions, so I'm closing this for now.
A script to merge positions by some filter (e.g. age) into one has multiple uses:
This should be able to be done relatively easily by building all models up to the last position to be merged and then creating one
CREATE
event per model which is used in the single position (and additionally oneDELETE
event for deleted models). All positions to be merged except one are then deleted and the one which is kept is filled with the new events. This should keep the datastore and the history consistent and also not change any current data.The text was updated successfully, but these errors were encountered: