double_entry icon indicating copy to clipboard operation
double_entry copied to clipboard

Don't force the use of a specific DB index

Open orien opened this issue 11 years ago • 3 comments

We include a work around for a MySQL query optimiser defect https://github.com/envato/double_entry/blob/master/lib/double_entry/balance_calculator.rb#L42-L48 https://github.com/envato/double_entry/blob/master/lib/double_entry/validation/line_check.rb#L55-L63

This MySQL defect has been patched (in 2010). Is it time to remove the work around?

orien avatar Jul 12 '14 23:07 orien

can we benchmark with and without?

asellitt avatar Jul 14 '14 01:07 asellitt

Reading @notahat's comments in the bug report. It doesn't sound deterministic.

Perhaps putting a flip around this is a way forward. Move forward with the change, while allowing a fast way to revert the behaviour if everything goes wrong.

orien avatar Jul 14 '14 02:07 orien

This is not an urgent fix. The index requested is still the appropriate index to use. We don't gain much from doing this work.

orien avatar Aug 23 '14 22:08 orien