Skip to content

Comment on Ask HN: Database schema for a chat app designed to handle a billion users

Comments

I use 'SELECT message, from, sentdate FROM offline_chat WHERE userid = <usersid?> AND acknowledged = 0'.....

Or something similar. I would bet it's all about indexing. It could be in a separate DB just for offline messages. When they come online, they would be moved to a ViewedDB or something. Could be just a really large table. =)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.