Hello,
Hibernate version:
3.0
I am building a messaging web app for 3000 users to
exchange messages with each other (the only way they can send/read messages is through our web app. No open protocol). It is
pretty much like a web mail app - registered users can log in and send to/read messages from each other. We are trying to use Hibernate 3.0 in this project.
There are a lot of historic messages for each user: each user have more than 5000 messages. Even after the system delivered, they will use the system very frequently. So my concern is about the performance/scalability issue:
If we keep all the messages in one table (using userID to distinguish), we'll have a table with >10 million rows. If we keep the messages in seperate tables (one table per user), we'll have 2000 tables with 5000 rows for each.
From DB design point of view, one table is easier to manage. But my concern is, will the performance be hit badly if I use one big table? You know, whenever a user login and access his/her Inbox, the system has to
load first page of messages from that 10-million-row table. Even we put index on userId, will it be performant?
|