Quantcast
Channel: Private messaging system, large single table versus many small tables - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Private messaging system, large single table versus many small tables

$
0
0

I'm considering a design for a private messaging system and I need some input here, basically I have several questions regarding this. I've read most of the related questions and they've given me some thought already.

All of the basic messaging systems I've thus far looked into use a single table for all of the users' messages. With indexes etc this approach would seem fine.

What I wanted to know is if there would be any benefit to splitting the user messages into separate tables. So when a new user is created a new table is created (either in the same or a dedicated message database) which stores all of the messages - sent and received -for that user.

What are the pitfalls/benefits to approaching things that way? I'm writing in PHP would the code required to write be particularly more cumbersome than the first large table option?Would the eventual result, with a large amount of smaller tables be a more robust, trouble free design than one large table?In the event of large amounts of concurrent users, how would the performance of the server compare where dealing with one large versus many small tables?

Any help with those questions or other input would be appreciated. I'm currently working through a smaller scale design for my test site before rewriting the PM module and would like to optimise it. My poor human brain handles separate table far more easily, but the same isn't necessarily so for a computer.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images