Frequently updated query: how to make it more efficient
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.
