Database speed optimization: few tables with many rows, or many tables with few rows?

前端 未结 7 848
鱼传尺愫
鱼传尺愫 2021-01-19 07:23

I have a big doubt.

Let\'s take as example a database for a whatever company\'s orders.

Let\'s say that this company make around 2000 orders per month, so, a

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-19 08:05

    I would not split tables by year.

    Instead I would archive data to a reporting database every year, and use that when needed.

    Alternatively you could partition the data, amongst drives, thus maintaining performance, although i'm unsure if this is possible in postgresql.

提交回复
热议问题