On 21 Jun 2011, at 19:19, David F. Skoll wrote: > On Tue, 21 Jun 2011 21:12:58 +0300 > Jari Fredriksson <ja...@iki.fi> wrote: > >> Are you sure you are not using MyISAM tables? > > I don't use MySQL at all. (Our CRM system requires it, but apart from > that, I stay away from it.)
To be fair to MySQL, these days it is pretty solid. There are potentially dangerous configuration options, but there are in Postgres too, and you can turn them off. Have you had a bad experience with a recent version? > >> When they lock, they lock the entire table, which is BAD for >> performance if there are multiple clients or threads using the >> database. InnoDB engine is much better. > > InnoDB may be better, but it's not as fast as CDB, and certainly > slower than a local CDB file. Just the TCP round-trip time will make > MySQL slower than local CDB files. Furthermore, the design of CDB is > inherently lock-free so there are no contention problems for multiple > readers. In the absence of writes, even MyISAM won't cause locking problems; that said I can easily see that CDB would be faster. My question is why does the speed matter, rather than the overall capacity? Surely the extra fraction of a millisecond is insignificant in the passage of the message. > > Finally, local files scale much better as you add servers because each > new server gives you a new chunk of disk bandwidth. Any centralized database > (MySQL, PostgreSQL) is much harder to scale in this way. Very true. But with tiny datasets like these, it's all in memory anyway - and given the read-almost-entirely workload, SQL replication works rather well. Indeed, given how small and how well, it is reasonable to have a server-local replica just as you do with CDB. Given that you are having to journal updates and rebuild databases anyway with CDB, I am not clear on why it represents a far superior choice, unless the mailservers using it are on a slow/low capacity network, or the database is shipped out to customers as part of an update service, rather than being local to an installation. > > Regards, > > David. > I'd be interested to hear your thoughts, Dominic