Filtering relations performance

Hi @Davide_Icardi - welcome to the Dgraph forums!

I think you mean indices in the way traditional RDBMSes use them. Indices in Dgraph are somewhat different. They’re used to support searching (exact, hash, etc).

The performance characteristics of a query in Dgraph is dependent upon the predicates. Because Dgraph “shards”* storage by predicate, this is quite equivalent to having an index on every column in a traditional RDBMS. I didn’t quite cover it, but I think you should read this blog post on how things work under the hood. No code involved.

Footnotes
* “shard” is probably not the right word to use. But basically Dgraph stores data by groups of predicates.