I've hit the DB performance bottleneck, where now?

后端 未结 7 1711
自闭症患者
自闭症患者 2021-02-15 18:37

I have some queries that are taking too long (300ms) now that the DB has grown to a few million records. Luckily for me the queries don\'t need to look at the majority of this d

7条回答
  •  余生分开走
    2021-02-15 18:44

    I would start by trying to optimize the tables/indexes/queries before before taking any of the measures you listed. Have you dug into the poorly performing queries to the point where you are absolutely convinced you have reached the limit of your RDBMS's capabilities?

    Edit: if you are indeed properly optimized, but still have problems, consider creating a Materialized View for the exact data you need. That may or may not be a good idea based on more factors than you have provided, but I would put it at the top of the list of things to consider.

提交回复
热议问题