views:

17

answers:

1

How can we expedite the data retrieval from the database for my web site which is extensively updating and fetching data from database.

+1  A: 

Updating slows down databases. If you want to have high-performance reads while performing updates, you might try the following:

  • Cluster your database. Have multiple databases to handle read queries, just do the writes to a single database, and distribute the updates in an orderly fashion. (Wikipedia does this, I'm told.)
  • Increase the RAM in your database (ie: attack database performance).
  • Decrease the number of indexes, as they take a long time to update.
  • Change your database. MySQL is reportedly not as good as postgresql for these kinds of workloads.
  • Batch updates to times when people aren't using the system (that's what many banks do).
vy32