#Concern over size of table

1 messages · Page 1 of 1 (latest)

dense flare
#

I am effectively making a chat app, I am worried that my messages table will have too many entries. Is this somethign I should beworried about?

twin juniperBOT
#

Hi @dense flare. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

In Convex, your data is stored as documents organized into tables. For a chat application, you might have a table named messages that contains documents with various fields. If you're concerned about the size of your messages table, there are a few things to consider.

Firstly, Convex is designed to handle large amounts of data. It provides a global state management system that runs in the cloud, allowing developers to easily build interactive and collaborative applications without managing backend infrastructure. This means that Convex is capable of handling large tables with many entries.

However, it's important to be mindful of the performance implications of large tables. For instance, counting the number of entries in a table by collecting all entries can be inefficient, especially for large tables. As such, Convex is working on providing more efficient ways to calculate counts.

In terms of querying large tables, Convex currently does not support field/column projections in a query. This means that if you want to look up/search for a field in a large table, all the data will be loaded into memory first, and then you can use array mapping to filter out the columns and send it to the client.

If you're in the early stages of your project, it's also worth noting that premature optimization can slow down your iteration speed. Until you have accelerating user adoption, the architecture of your application may not be as important as getting your product out there and gathering feedback.

In conclusion, while it's good to be mindful of the potential performance implications of large tables, Convex is designed to handle large amounts of data and is continually working on improving its performance. If you're still in the early stages of your project, it might be more beneficial to focus on iterating quickly and gathering user feedback.