PostgreSQL: Is it better to use multiple databases with one schema each, or one database with multiple schemas?

后端 未结 5 2007
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 04:06

After this comment to one of my question, I\'m thinking if it is better using one database with X schemas or vice versa.

My situation: I\'m developing a web applicat

5条回答
  •  孤街浪徒
    2020-12-02 04:35

    A number of schemas should be more lightweight than a number of databases, although I cannot find a reference which confirms this.

    But if you really want to keep things very separate (instead of refactoring the web application so that a "customer" column is added to your tables), you may still want to use separate databases: I assert that you can more easily make restores of a particular customer's database this way -- without disturbing the other customers.

提交回复
热议问题