Norsk.Firefox Posted October 22, 2007 Share Posted October 22, 2007 Hello, I'm working on a private messages (PM from now) system. I's able for the admins to send a PM to everybody, but which case is the best? One table with one PM for each user, (id, to_id, title, msg, time and read) Or two tables, one with the PM, and one witch control the read/deleted info. The First one will have a message pr user, for every mass PM. (If I send 3 PMs to 10000 users, it will create 30 000 rows.) The second one will have one row for each mass PM, and when the user read the PM it creates a row in the second table witch tell my function that the user has read the PM. This is cleaned after the mail has been in the inbox for a month or something. Witch is the most effective? Link to comment https://forums.phpfreaks.com/topic/74370-optimized-mass-pm/ Share on other sites More sharing options...
Azu Posted October 22, 2007 Share Posted October 22, 2007 Personally, I think that the second method would be much faster. It would create the PM instantly instead of maybe taking a lot of time (and space). And also, the system won't be slowed down by users that don't visit the site anymore. Link to comment https://forums.phpfreaks.com/topic/74370-optimized-mass-pm/#findComment-375792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.