RE: [Dovecot] Using MySQL to store email?
Marc Perkel trolled:
So Timo,
Have you considered the idea of storing all the email in a MySQL database? Seems to me that MySQL could somplify all the backend stuff that everyone struggles with and with replication one could create very massive and reliable systems. What would it take to use MySQL that way?
Maybe we could recode Dovecot in PHP, too.
Sorry, that was nasty. However, having recently experimented with a very large mail storage system using mysql, I strongly advise against this avenue. In particular, the two main backends have serious deficiencies when you get up to the multi-gigabyte ranges:
- MyISAM doesn't restart in constant time.
- InnoDB's next-key locking kills performance on large blob inserts & deletes.
Anyway, what do you mean, everyone struggles with backends? Dovecot's backends are fast, modular and reliable.
Regarding replication; all good logical volume managers can do this.
Regarding massive; all good filesystems can do this.
Regarding reliable; I guarantee that mysql reliability (when properly managed) is still lower than that of a filesystem (when properly managed).
In fact, the whole argument is specious. Filesystems already are databases, optimised for storing arbitrary-sized data objects using a hierarchical key, which is practically the definition of mail storage.
/jg
The reason to use mySQL isn't performance. It's the ability to index things and do tricks that you can't do without a DB. If I need more speed I'd buy faster computers. There's no point in arguing speed issues because that's not the reason that someone would choose MySQL. There are several things I'd like to do that you can not do at all without a DB.
participants (2)
-
Joshua Goodall
-
Marc Perkel