Optimization of complex filters

Thank you for a very interesting project. I’m interested in learning more about how Dgraph evaluates queries internally. For a filter like “condition1 AND condition2” my understanding is that a RDBMS will have a query optimiser that will decide which of condition1 or condition2 is more selective and should thus be evaluated first to narrow down the search space. They also make it possible to have multi-column indexes that can resolve such filters in a single lookup. Does Dgraph utilise similar strategies?

+1 , I am too interested in this - as recently, one of the user in slack “Bin Du” asked and shared his problem in facing performance issue with multiple condition in filter.

My opinion is the way badger is designed, it does not have multi column index thing so performance is going to get hit with multiple filter condition.

Here, one need to design schema in much better way to not have multiple filter and I believe that will be more like creating multiple data by setting more predicate and creating relation.

Key-Value database are not designed for relation thing, we need to set the relation from the query output. That’s one thing I have learned using key-value database.

Waiting for dgraph team opinion

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.