widiW
Convex Community8mo ago
2 replies
widi

Frequently updated query: how to make it more efficient

Do I understand it correct that when I have a query that gets 100 rows and then I update only one of the row, the query gets called again after the single row update to refetch all 100 rows?

Background: I'm creating a chat app where it is very active, typing indicators, lots of chat bubbles sent at the same time or in quick succession.

If I show the latest 100+ chat bubbles (1 bubble = 1 row) to a user, does it mean the query gets called repeatedly over and over again every time a user sends a message? because I tested it, and it basically ate through all the bandwidth in my free tier after a few days of intense chatting (real human interaction though, not even stress testing it) I added index but it only helps a little bit.
Was this page helpful?