Selecting fields performance
I'm curious what the edge version of this is, requesting a singular field using .map is only possible if you are searching a index. if you just do settings = await ctx.table('users').get(userid).edge('setting') there is no .map available. so down to settings[fieldName].. i know its not a hugelist but im hoping this is as efficient as possible.
1 Reply
The vanilla Convex code that Lee wrote doesn’t do anything special in terms of loading fields. Right now in Convex whole documents are loaded into queries and mutations.
So if you load a single document (via vanilla ctx.db.get(), .unique() or via Ents .edge() etc.), the index syntax is the way to go (or using desctructuring):