Boundaries processing query running time varies too much
Hello
I've noticed that the boundaries population query, run when we assign each feature version to an administrative boundary during the update_changes process can be very fast and sometimes very slow. I don't explain exactly why.
See https://github.com/vdct/ProjetDuMois/blob/master/db/24_changes_boundary.sql
Here are some running times:
[2461s] Populate boundaries Timing is on. INSERT 0 15052 Time: 222207.521 ms (03:42.208)
[3140s] Populate boundaries Timing is on. INSERT 0 1214006 Time: 91469.633 ms (01:31.470)
[7335s] Populate boundaries Timing is on. INSERT 0 1334412 Time: 218231.549 ms (03:38.232)
[4506s] Populate boundaries Timing is on. INSERT 0 40381190 Time: 2309353.437 ms (38:29.353)
We should figure out how to improve that or at least make it more deterministic