-
-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optimize applications overview query (#6883)
We encountered an issue with a customer because this query was returning 3 million rows. The problem arose from each instance reporting approximately 100 features, with a total of 30,000 instances. The query was joining these, thus multiplying the data. This approach was fine for a reasonable number of instances, but in this extreme case, it did not perform well. This PR modifies the logic; instead of performing outright joins, we are now grouping features by environment into an array, resulting in just one row returned per instance. I tested locally with the same dataset. Previously, loading this large instance took about 21 seconds; now it has reduced to 2 seconds. Although this is still significant, the dataset is extensive.
- Loading branch information
Showing
5 changed files
with
163 additions
and
1 deletion.
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
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