Ok so I have a site with users. I want a user to be able to send a message to multiple users based on a search query.
Eg. John searches for "Florida" and this search returns 1 million users/companies. Whats the best way to let john send a message to all those users/companies returned by the search result?
Lets say, Susan was 1 of those users. When she logs into the site she should see the message which John sent (because Susan was in the results returned by the search)
(NB: the messages are internal to the site (not emails))
I have a "Message" table which stores the primary message.
Option 1: is to have a Participants table which stores the message_id and user_id. However this would require doing 1 million insertions into that table.
Option 2: ????
Any Ideas of whats the most efficient/best way to do this?
*EDIT: To clarify for the usage of this.*
It is not spam.
The site works like an Alibaba.com where the users/companies on the site, want to have the internal messages show up. The Idea is, a user searches for something, and based on that query, he can send a message to all the companies/users who show up in the search i.e a Buy Leads Request