0

我们如何为我的网站加快从数据库中检索数据的速度,该网站正在广泛地更新和从数据库中获取数据。

4

1 回答 1

1

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).
于 2010-06-06T07:48:39.330 回答