Some thoughts - although this was done about 5 years ago. I spent a couple of days testing both mysql & postgres
*Reasons to use mysql* - fast - easy to setup - lots of people know how to use it *Reasons not to use mysql* *-* data integrity out of the box was a bit lacking [fixed now?] - can silently truncate data [fixed now?] - corrupted data when under load *Reasons to use postgres* - data integrity - when overloaded did not corrupt data - sql standards - "big boy" db tools *Reasons not to use postgres* - not as many people are familiar with it - if something goes wrong, not many places to turn - not supported on most hosting environments - need a bit more technical expertise I was doing over 100,000 SMS messages per hour & postgres could handle the load on barebones infrastructure. Picking a db is a pretty important; its quite easy to setup some testing - some techies get quite protective of "*their*" technology & may not consider alternatives. I did something like this for testing - it took about 2 days to setup & run. 1. Install each on the same box 2. Create a test db [say 5 tables with 1,000,000 records each with relationships between them] 3. 100000 simple selects 4. 100000 simple selects with 1 join, then 2 joins 5. 100000 updates as per simple selects 6. 100000 deletions as per simple selects 7. Do the same under CPU load, then disk load 8. You could also scale out to a number of machines if you plan of having a large site 9. publish the results here if you can! Having said all that, I'm using mysql in my new project for dev - its easy to setup, the tools are better, & I don't have telco standard data integrity issues to deal with. Has anyone used Hapoop? http://hadoop.apache.org/ rgds, - matt. 2010/1/27 James Sadler <[email protected]> > Thanks Xavier - I'll make a note of that for the next time I'm forced > to use MySQL :) > > Anyone have any idea why that isn't the default though? > > 2010/1/27 Xavier Shay <[email protected]>: > > > > > > On 26/01/10 12:48 PM, James Sadler wrote: > >> > >> The second big win is that Postgres doesn't silently truncate text > >> columns like MySQL does. Either a record inserts/updates entirely or > >> it doesn't at all. Postgres is simply more robust in this regard. > >> (and there may be options to enable this behaviour in MySQL, but they > >> are not enabled by default). > > > > ~> cat /etc/my.cnf > > [mysqld] > > sql-mode="STRICT_TRANS_TABLES" > > > > Highly recommended. You can set it per connection if you want but this > > doesn't seem like a good idea to me. > > > >> 2010/1/26 Steve Hayes<[email protected]>: > >>> > >>> Postgres has transactional DDL. Last time I looked MySQL didn't - that > >>> was > >>> enough for me. > > > > MySQL still doesn't > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby or Rails Oceania" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<rails-oceania%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/rails-oceania?hl=en. > > > > > > > > -- > James > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rails-oceania%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
