开发者

Private messages organisation model

开发者 https://www.devze.com 2023-02-16 20:59 出处:网络
I\'m going to organise social network. So the question is: how the tables responsible for private maessages should b开发者_运维知识库e organised : (1) one table for each user, (2) one table for 1000 u

I'm going to organise social network. So the question is: how the tables responsible for private maessages should b开发者_运维知识库e organised : (1) one table for each user, (2) one table for 1000 users or it's better (3) to create one table for all the user's messages, considering that the system is high loaded.


Plan small and use a single table. Worry about scale when you get there. The problems you encounter in 6 months will not be the problems you're thinking about today.


I'm going to organise social network.

Omg, another one!

You should use NoSQL and caching solutions like mongodb or membase to be prepared for high load. If you still want to stick to postgres, you should create a partitioned table.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号