Jump to content

Optimized mass PM


Norsk.Firefox

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.