-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): Fix performance issue within a mysql request (#9680)
* fix(backend): Fix performance issue within a mysql request Reprace the existing mysql request that use nested select, with inner join for better performance. The fix levarage 'SQLDialect' interface, because the new request is not supported by sqllite (used for testing) This interface bridges the difference between mysql (production) and sqlite // (test) Issue: #6845 Signed-off-by: diana <difince@gmail.com> * For sqlite use UPDATE FROM to join the target table against another table in the database in order to help compute Try to generalize the method in SQLDialect interface Signed-off-by: diana <difince@gmail.com> * Add unit tests Signed-off-by: diana <difince@gmail.com> * Replace nested query for Jobs and start using pre-comit Signed-off-by: diana <difince@gmail.com> * Fix: Use LEFT JOIN instead of INNER JOIN Signed-off-by: diana <difince@gmail.com> --------- Signed-off-by: diana <difince@gmail.com>
- Loading branch information
Showing
3 changed files
with
58 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters