-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(graphql): add configurable tag selectivity sorting PE-7054
This change adds support for configuring tag join order via a TAG_SELECTIVITY environment variable containing JSON mapping tag names to selectivity weights. This is used when constructing SQLite tag join SQL to determine the order in which to perform the joins (most selective first). It also alters the table used to order results. If no tag is present with a selectivity weight of >= 0 and there is an owner or target address specified on the query the transactions or data item tables are used for sorting rather than the tags table. This prevents a lot of index scaning when low selectivity tags are combined with high a high selectivity owner/target address filter.
- Loading branch information
Showing
5 changed files
with
56 additions
and
13 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
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