Обсуждение: large database versus many databases
Hi, we are currently planning a very large installation of a web-application using PostgreSQL. The application can be configured to handle 1 database per customer, or all customers in one large database. We plan to start with e.g. 500 customers, each of which can have 200 MB or more in the database. And we want the system to be expandable as needed (thousands of customers, using lots of memory). Has anyone any experience what is best - using one very large database for all customers or - using 1 database per customer concerning expandability, performance, server configuration, system updates etc. Is it advisable not to install more than a certain amount of databases on one server? Any hints welcome, Thanks, Uwe
Uwe Maiwald <u.maiwald@kiss-net.de> writes:
> we are currently planning a very large installation of a web-application
> using PostgreSQL. The application can be configured to handle 1 database
> per customer, or all customers in one large database.
> We plan to start with e.g. 500 customers, each of which can have 200 MB or
> more in the database. And we want the system to be expandable as needed
> (thousands of customers, using lots of memory).
The one-big-database approach would scale better, but is performance
your only consideration? Separate databases would enforce strict
separation between customers, which might be either a good thing or
a bad thing depending on your needs.
regards, tom lane
Uwe Maiwald wrote: > Hi, > > we are currently planning a very large installation of a > web-application using PostgreSQL. The application can be configured to > handle 1 database per customer, or all customers in one large database. > > We plan to start with e.g. 500 customers, each of which can have 200 > MB or more in the database. And we want the system to be expandable as > needed (thousands of customers, using lots of memory). > > Has anyone any experience what is best > - using one very large database for all customers or > - using 1 database per customer > > concerning expandability, performance, server configuration, system > updates etc. > > Is it advisable not to install more than a certain amount of databases > on one server? > > Any hints welcome, > > Thanks, Uwe > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > I am currently developing a system like this and we are using one database per customer. You only have to consider one thing. If you have only one database for all customer and database have a problem all customer can't work. If you have many databases as customers if a database fails only one customer can't work, and it's easier to solve for one that for all.
With many databases (instead of one large database) you can move them around as resources before scarce, ie: to other servers or expanded disk. The down side is there will be many to be maintained, but automated scripts should take care of most of that.
Need more speed? Get Xtra Broadband!