Floris
Floris

Reputation: 309

DB schema to store billion e-mails

I'm trying to develop an application where users can import their e-mails into and search their imported e-mails. As this will probably be used by many users (easily 10k+) the database design is critical. With these numbers of users the database will probably need to be able to hold over a billion rows (e-mails).

The application will need to be able to quickly return records after a search query is posted on the application. The database will be heavily searched and I would like some help on creating the database table(s) for creating an efficient db schema. I have a lot experience with MySQL myself but I've read somewhere I shouldn't go that way and go look for MongoDB or something? Is the difference so big or is there any way I can still go with MySQL?

These are the searchable fields, of course all e-mails will have an extra two "columns" for the unique id and the user_id. I've found several db schemas of e-mail but I can't find any documentation of a schema that will work with over a billion rows.

Upvotes: 1

Views: 470

Answers (1)

acutesoftware
acutesoftware

Reputation: 1091

You would be best off starting simple with your proposed table definition and going from there - if the site does get near a billion records then if needed you can move it to amazon servers or another cloud host which (should) allow the table to the partioned.

MySQL can handle a fair amount of data, assuming you are not on a shared host with restrictions.

So, start simple, dont optimise a problem that doesnt exist yet, and see how it goes.

Upvotes: 1

Related Questions