Jama A.
Jama A.

Reputation: 16109

Advantages of using multiple schemas?

We are currently developing In Java/Hibernate multiuser application with postgreSQL.And we are migrating our database to multiple schemas (one schema as one company); Now i saw this drawback database size is getting more and more even though there the same data:before migrating there were 700MB; after roughly 2GB.

Because of this we are facing backuping/restoring problems it is taking much more than previous one.

Q:it can be avoided wasting time/space for making faster deliverability? Or, are we doing something wrong ?

Upvotes: 1

Views: 1849

Answers (2)

Cjxcz Odjcayrwl
Cjxcz Odjcayrwl

Reputation: 22877

You have not written what you have really done.

I suppose you have some common data (f.g. dictionaries) that you have also copied. When this data will be common for each company (not customized), you should just keep it in separated schema.

Upvotes: 1

Scott Marlowe
Scott Marlowe

Reputation: 8920

You need to make a simple test case that shows this happening to really investigate it. We use literally over a thousand schemas to implement multiple wikis on a db server and it works pretty well.

And I wish I had a db that was only 2GB to backup nowadays. :)

Upvotes: 2

Related Questions