Question regarding indexes
I think im a bit confused on the underpinnings on how some of this works.
If im fetching documents that needs to be sorted, im wondering whether if by placing an index on that field, a more efficient sorting algorithm can be implemented. Moreover, Im assuming given that the docs will essentially be sorted ahead of time, this will reduce table scan?
In practice, im trying to figure out:
note: I understand that convex has the default creation time property and thus fields like postDate may be unnecessary, but this is for example sake
Should i use an index in this situation?
Is this proper application of an index? No eq, but rather a gte followed by the second half of the composite index thats not explicitely applied
im trying to see whether the appropriate index should be
.index("by_districtsId", ["districtsId"]) or .index("by_districtsId_postDate", ["districtsId", "postDate"])