ankushOriginal post
Web Developer
In one my database, my attribute for sid seems to no more than 32 characters. I am not sure what 768 limit is here. Can't find it in the docs either.
I need it to optimize fetch performance for my query here:
const { documents } = await databases.listDocuments(
DB_ID,
SESSIONS_COLLECTION,
[
Query.equal('sid', [sid]),
Query.orderDesc('$updatedAt'),
Query.limit(1)
]
);
Could someone help me please?
This is related to an issue where my project was blocked a couple of days ago - https://discord.com/channels/564160730845151244/1379470042198179940
Summary
The developer is encountering an error when trying to create an index due to a length limitation of 768 characters. They are unsure of the cause as their attribute `sid` is within the 32-character limit. They need assistance to optimize the fetch performance for their query.
**Solution:**
- The issue is likely related to the length of all indexed fields combined. Consider shortening field names or creating a composite index that includes `sid`.
- Review the index configuration and database limits to ensure compliance.