add-memberalign-toparrow-leftarrow-rightbellblockcalendarcamerachatchevron-leftchevron-rightchevron-small-downchevron-upcircle-with-crosscomposecrossfacebookflagfolderglobegoogleimagesinstagramkeylocation-pinmedalmoremuplabelShape 3 + Rectangle 1pagepersonpluspollsImported LayersImported LayersImported LayersshieldstartwitterwinbackClosewinbackCompletewinbackDiscountyahoo

Re: [ruby-99] Tech interview questions

From: ambert h.
Sent on: Sunday, May 23, 2010 9:29 PM
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

On Fri, May 21, 2010 at 12:39 PM, DAN BIKLE <[address removed]> wrote:
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.


[address removed]

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:
To unsubscribe or to update your mailing list settings, click here:
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy