Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Optimize logbook SQL query again #12881
This brings back #12608. It was reverted in #12762 because of a report that it slowed the logbook down to be unusable. I have worked with @jjlawren to analyze this issue and it is fully fixed by the index that #12825 proposes.
Also note that reverting the optimization made the logbook similarly unusable with other workloads.
I believe the index and this optimization in tandem will avoid the pathological slowdown in both scenarios (I'm afraid to say "all scenarios" because databases are strange and we support so many of them).
The last line of the patch compares a field with NULL to include rows with no match in the outer join. I have changed this field from
If the code does not interact with devices: