Does withIndex().order().first() scan all documents?
Hi there, I want to use order("desc").first() to get the maximum number from an indexed number column. This table has more than 16k documents. Does ordering scan all the documents?
1 Reply
No, the order just determines which side of the index to start from. It should just fetch one document