nemophrost
nemophrost
CCConvex Community
Created by nemophrost on 4/17/2025 in #support-community
One to one relationships vs returning partial records
Is there a performance or cost benefit to separating data into multiple tables with one to one relationships vs storing all the data into one table and returning partial records if that’s what you need? Example: Books table with title, author, page count, etc Chapter summaries as a separate 1:1 table (bookId with an index) vs chapter summaries as a field on the books table. To just query for a list of books with multiple tables, I can just query and return from the books table. If a single table I could remove the chapter summaries before returning data to the client to keep bandwidth down. Then if I want a list of books or a single book with summaries I could either join that data (convex style) or just not filter it out. Are there considerations other than the 8MiB data read limit for queries (possible downside to a single table) and having an extra index (possible downside to 2 tables)?
4 replies
CCConvex Community
Created by nemophrost on 1/18/2024 in #support-community
Prod vs dev env in Usage dashboard
First of all, great work on the usage dashboard - amazing! It’s unclear to me though if the stats there are for dev + prod (my assumption is the answer is yes). Can you clarify? Also are there plans to have filters for usage between the two for a project? (Right now I’m still in early testing of my project so I suspect my dev env is using the lion share of resources but it would be nice to confirm) Thanks!
4 replies
CCConvex Community
Created by nemophrost on 10/23/2023 in #support-community
Query and Mutation timing
So far it seems when I write to a table with a mutation, the response comes back before my query listeners update with the new data. Is this just a likely race condition or is there a guarantee that this will always be the case? (Using react client libraries) Thanks!
3 replies
CCConvex Community
Created by nemophrost on 5/26/2023 in #support-community
Upper and lower bound index query expressions with different field names
I'm getting a Typescript error, so I assume it isn't possible, but I thought I'd ask. Is it possible to use different field names for the upper and lower bound expressions in an index query (assuming it still follows the rule about keeping the same order as the fields in the index)? Or will it/could it be?
.withIndex('by_notebook_endDate_startDate', (q) =>
q.eq('notebook', notebookId).gte('endDate', start).lt('startDate', start)
)
.withIndex('by_notebook_endDate_startDate', (q) =>
q.eq('notebook', notebookId).gte('endDate', start).lt('startDate', start)
)
4 replies