Consider increasing default gap in RelativePositioning
In https://gitlab.com/gitlab-org/gitlab-ce/issues/64514 we see a performance issue due to relative positions being close together.
We are fixing the performance issue in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30938 but I think it is also worth considering increasing the gap size to prevent needing to update multiple rows.
In RelativePositioning we currently have:
MIN_POSITION = 0
START_POSITION = Gitlab::Database::MAX_INT_VALUE / 2
MAX_POSITION = Gitlab::Database::MAX_INT_VALUE
IDEAL_DISTANCE = 500
- I think we should set
MIN_POSITIONto include the negative integer space, otherwise that's just a waste. - We should also consider using
BIGINThere so that we have a larger space to work with. - Then we can increase the
IDEAL_DISTANCEso that close sequences are less likely to occur.
cc @smcgivern