When to index a string with hash instead of exact?

Dgraph takes care of dealing with collissions. So, functionality wise, they’re exactly the same. But, they matter in terms of storage and performance. If you expect strings longer than say 16 bytes, I’d suggest using hash. In general, hash is a good idea – exact is useful only if you already have a string whose length is confined to a small limit (like username).

5 Likes