04 / 18

What happens if I create an index on all fields of the collection?

Indexes are data structures that occupy space and memory in database. Therefore, it is beneficial to create indexes for fields that are frequently used in query conditions/ filtering or for sorting, as this can significantly improve query performance.