Dgraph metadata
Dgraph version : v21.03.0
Dgraph codename : rocket
Dgraph SHA-256 : b4e4c77011e2938e9da197395dbce91d0c6ebb83d383b190f5b70201836a773f
Commit SHA-1 : a77bbe8ae
Commit timestamp : 2021-04-07 21:36:38 +0530
Branch : HEAD
Go version : go1.16.2
jemalloc enabled : true
What I want to do
I’m building a dictionary service based on dgraph and the dictionary entries - and the queries to generate them - can be quite complex with many meanings, submeanings, translations and other data that can be part of a dictionary entry.
I try to lookup/generate dictionary entries and some of my filters use a “language” field like this:
translations : translation @filter(eq(language, "hun") AND uid_in(dentry, 0x40ee58)) {
...
}
“language” is always a 3 letter abbreviation of the language.
These filters can take 200-400ms according to jaeger in some queries although the language field is hash indexed and so it should be equally fast for any filter in theory.
What I did
I created an example query, ran it and collected traces using jaeger. The schema and partial screenshot of the jaeger UI is also included in the archive:
slow_query.zip (2.9 MB)
Am I doing something wrong here, or what could be the reason for these slow “language” field lookups?
Thanks!