Gerhard
CCConvex Community
•Created by Gerhard on 9/13/2024 in #support-community
efficiency of: return (await ctx.db.query("messages").collect()).length;
Thx. @lee , "separate table" that's a surprising answer.
To me it seems that convex will not be suitable for administration systems where tables have 40+ columns or subObjects (json) that is unique to the record being stored. (Surely you don't want a ton of 1-1 relationships?)
Think of an event, a patient admission, a treatment etc. (Chats and tasks are really basic examples)
So if I want to lookup/search for a name or a field in a large table, you are going to load all the data into memory first, and then let me use array mapping to filter out the columns and send it to the client.
It seems there are only "select * from table" or collection.find(qry, {"no projection"}) options in convex.
Could you confirm that there is no "select col1, col4, col9 from largeTable" equivalent (even on the server)?
If not, do you consider it important, or does it just not matter.
(pardon the persistence, but maybe it's the lessons learned since the early 90's using 4GL / SQL and recently mongo that makes me think about optimisation of data to memory.)
7 replies
CCConvex Community
•Created by Gerhard on 9/13/2024 in #support-community
efficiency of: return (await ctx.db.query("messages").collect()).length;
any ideas and plans on field/column projections in a query @lee ,
lists often don't need all of the underlying columns
7 replies
CCConvex Community
•Created by Gerhard on 9/13/2024 in #support-community
efficiency of: return (await ctx.db.query("messages").collect()).length;
I see https://github.com/get-convex/convex-backend/issues/10 mentions a undocumented feature.
Count is quite integral in data management in my view.
7 replies