Credit to Nikita Koltsov for the initial rework to use temporary tables and stored procedures to speed up some of the code.
I built upon Nikita's code and added additional cleanup/reworks/optimizations to bring the code to where it is now.
The code is not perfect, and there's some low-hanging optimization regarding volume/image metric cleanup which I've hinted at in one of the comments in the code, but which I simply have not gotten around to. Nonetheless, submitting as-is in case it can help give a good starting point for something baked into the charm..
I've received permission to share this.
Original methodology from Erlon Cruz: https:/ /github. com/gnocchixyz/ gnocchi/ issues/ 1050#issuecomme nt-542753802
Credit to Nikita Koltsov for the initial rework to use temporary tables and stored procedures to speed up some of the code.
I built upon Nikita's code and added additional cleanup/ reworks/ optimizations to bring the code to where it is now.
The code is not perfect, and there's some low-hanging optimization regarding volume/image metric cleanup which I've hinted at in one of the comments in the code, but which I simply have not gotten around to. Nonetheless, submitting as-is in case it can help give a good starting point for something baked into the charm..