#Can I create a message system with Supabase?
1 messages · Page 1 of 1 (latest)
technically yes, the more data the slowest it will be
but that's why you should add an index to the columns used to filter the data, so when you query your DB you don't iterate all the rows, only the ones you actually need
e.g. if you add a conversation_id column to the messages tables, and add an index in that column you can then query by conversation, a conversation is unlikely to have a lot of messages, and even it if does have a lot of messages you can paginate them so you only get a subset of those message each times
why are you worrying about speed
it's kind of pointless
unless you have millions and millions of messages you're not going to have much of an issue. and even then , you are going to be using queries to get messages by user id, you're going to have pagination as well. you are not likely to be doing a full blown search on all messages, that's what would be slow.