-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ Optimized performance of integrity check DB calls
refs #252 - the referenced issue describes performance problems with the integrity check code in knex-migrator - this commit solves half of the problem - 1 DB call per migration minor version folder - this results in 70+ (and growing!) DB calls at boot, with each one going back and forth to the DB... not efficient - what the code actually needed was a count of how many migrations are currently in the DB, group by minor version - this is very easy to do in SQL and therefore knex - this commit switches the code around to group all the DB migrations first, and then compares against the folders locally - this results in a drop of SQL queries from 70+ to 1 🚀
- Loading branch information
1 parent
3e8f344
commit ec46a40
Showing
1 changed file
with
60 additions
and
58 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