Q1: Flattening out by using more columns, and putting more data in each column, increases insertion performance since you don't have to insert into multiple tables for things that you would have split up in 1st, 2nd, 3rd normal form. But depending on your schema, denormalizing also means redundant inserts if multiple tables reference the table that you just got rid of. So if the database isn't sharded, I'm not sure how much gain you get if you get rid of an extra insert, only have to insert twice.
Caveat with having lots of columns is if you collapse several tables into one but end up needing to index multiple columns in the same table. Slows down insertion since the db has to calculate where an object goes on the b-tree every time there's an insert.
Q2: Dunno too much about this, someone educate me! I believe PostgreSQL and Oracle have journaling and MySql doesn't, I dunno http://en.wikipedia.org/wiki/Write-ahead_logging
On Fri, May 21, 2010 at 12:39 PM, DAN BIKLE <[address removed]>
What denormalization techniques can we use at the database layer to
speed up INSERTS.
Compare/Contrast features and behaviors of MySQL, PostgreSQL, (and
Oracle if you want) which are interesting to the Rails developer and
Rails site operations dept.
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by DAN BIKLE ([address removed]) from Silicon Valley Ruby Meetup.
To learn more about DAN BIKLE, visit his/her member profile: http://www.meetup.com/silicon-valley-ruby/members/165657/
To unsubscribe or to update your mailing list settings, click here: http://www.meetup.com/silicon-valley-ruby/settings/
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]