Multiple facet performance concerns

A couple questions:

  1. Are there any performance concerns to take into account when using multiple facets in production?
  2. Where are facets stored when sharding dgraph data?

I don’t believe so. Facets are added as simple key-value pairs (weights) to BadgerDB. Just like any predicate. It just sets diferently cus it’s on Edge.

Dgraph/Badger handles Shards automatically. It creates a pattern of small chunks (I’m not an expert on the algorithms and patterns used). As facets and predicates are KV, they stay in the “same place”. The chunks are dealt through Badger.

You can use as many Facets as you need. Just worry about indexing, your application needs to be built thinking what the types of indexing you’ll use in Dgraph. (I think it’s more important, particularly)

Cheers