Back

Compound Index Use Case

  • 0
  • Databases
Tanner Meade
16 Feb, 2023, 19:29

If a collection has a index for 3 attributes, is the 3 attr index used when only the first 2 attr are queried against?

I'm asking because Appwrite seems to not support searching for Query.equal("attrThatIsAList", []) so I need to not include that query if the value is an empty list.

TL;DR
The user is asking if a compound index is used when querying only part of the attributes included in the index. They also mention that Appwrite does not support searching for an empty list in a specific query.
Drake
16 Feb, 2023, 20:50

Appwrite checks for matching index. So same attributes in index as the queries

Tanner Meade
16 Feb, 2023, 20:57

Do you know if it is “Exact” same queries or contain the attributes?

Drake
16 Feb, 2023, 21:00

Exact

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more