I am using Ruby on Rails 3.0.7 and MySQL 5. In my application I have two database tables, say TABLE1 and TABLE2, and for performance reasons I have denormalizated some data in TABLE2 so that I have repeated values of TABLE1 in that one. Now, in TABLE1 I need to update some of those involved values and, of course, I must update properly also denormalized values in TABLE2.
What I can do to update those values in a performant way? That is, if TABLE2 contains a lot of values (1.000.000 or more), what is the best way to keep update both tables (techniques, pratices, ...)?
What can happen during the time it takes to update the database tables? For example, an user can have some problems on acceding some web site pages involving those denormalized values? If so, what those are and how can I handle the situation?