-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt(GraphQL): filter existence queries on GraphQL side instead of using
@filter(type) (#7757) For the existence queries we used to do: query {\n Cuisine_1(func: eq(Cuisine.name, \"yaMqnmHeov\")) @filter(type(Cuisine)) {\n uid \n } \n} The filter operation can be very heavy on dgraph.type as it may store millions of nodes. A better query could be like this: query {\n Cuisine_1(func: eq(Cuisine.name, \"yaMqnmHeov\")) {\n uid dgraph.type \n } \n} This PR removes the above @filter operation from the existence query and uses the suggested alternate query which is lightweight. The existence check operation is path critical and this fix is expected to add some performance improvement along with preventing OOM.
- Loading branch information
1 parent
aff03e5
commit 690fbbe
Showing
14 changed files
with
590 additions
and
326 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
Oops, something went wrong.