Perhaps I'm missing some possible configuration tweaks to MySQL?
You'll probably see a big improvement using the native mysql driver for ruby.
Perhaps I'm missing some possible configuration tweaks to MySQL?
You'll probably see a big improvement using the native mysql driver for ruby.
When trying to compare database performance, the answer is always 'it depends'. There are just so many factors to consider (the driver, the size of data set, the complexity of queries, indexes, optimization, etc.) that a fair comparison is pretty much impossible.
I think MySQL, PostgreSQL and SQL Server have all proven to be fast enough to run high-performance web applications against. So the choice of which one to use for a given application is more a matter of taste. Personally, if I had free choice I would use PostgreSQL as I've found it a pleasure to work with. At work it's mandated that we use SQL Server so we use that for all our rails development, and again, I'm pretty happy with it.
Tom
Tom Ward said the following on 02/20/2007 06:36 AM:
[snip]
For INSERTs:
(a) MySQL : ~190.0 (b) SQL Server : ~ 10.9 *** BEST *** (c) PostgreSQL : ~ 11.1
For SELECTs:
(a) MySQL : ~7.2 (b) SQL Server : ~8.2 (c) PostgreSQL : ~2.7 *** BEST ***
Overall, I would say PostgreSQL comes out on top. Obviously, my tests are hardly conclusive.
Indeed. For selects - and you don't indicate the complexity or size or indexing - MySQL and SQLServer are within error bounds of each other. If the inserts are only occasional the disparity doesn't matter. And if you are running something like Amazon on MySQL then there's the bulk loader.
Do people find PostgreSQL to be faster than MySQL? (I know, the answer is probably "it depends", but I am just asking generally).
The "It depends" probably has error bars which are more than 100% of the results you obtained. For example, MySQL has different engines - InnoDB, MyISAM, (compared to MyISAM, InnoDB performs additional safeguards to guarantee data integrity), issues to do with logging, issues to do with checking authorization; the ability to ignore roll-back, and quite probably performs differently on different platforms (You ran this comparison on AIX, HP-UX?)
For example: http://www.mysql.com/news-and-events/newsletter/2003-11/a0000000269.html
I think MySQL, PostgreSQL and SQL Server have all proven to be fast enough to run high-performance web applications against.
Indeed. And many of the corporate clients I've worked with that use three-tier applications use Big Iron of some kind, up to and including mainframes, as their database engines.
Its been pointed out here that this kind of architecture lends itself to highly clustered web servers, so the database engine is, so long as you have a driver and its SQL-compliant, pretty arbitrary.
I have no doubt that as Rails becomes poplar, it will address things like stored procedures and get drivers or proxy drivers for highly specialised databases.
I certainly wouldn't let any manager be misled on the basis of these tests. They are no more meaningful than compiler races or the speed tests of Apache vs IIS. "It All Depends".
Have you ever looked under the hood on the leading databases and seen how many parameters you can tweak? There's a lot of "it all depends" that it can depend on!