Creating one database per Client in MySql
We have a finance related application in which we are cr开发者_C百科eating a database(schema) for each client(Company). There will be many rows for single client.
I want to know if it is best to keep data separate(like it is now) or combine. We are looking for more than 10000 databases per server.
Even though not all users will be online at same time buy 10% of users my be online at same time easily.
My questions are.. 1) Is there any serious problem (performance wise) for keeping multiple databases. 2) Is it common practice to keep different databases when it comes to financial data of companies.
"10000 databases per server" - that's a lot of databases! [Assuming 5 users per DB, and 10% active that's still 5000 active user connections per server]
Putting that aside: your primary concern here is probably the security of each client's database. Keeping them separate will make it easier to manage security.
To answer your questions:
No, there is no performance problem having multiple databases (other than the sheer volume of transactions being handled by the server). In fact, there might be performance gains in terms of row range locks being held.
Yes, it is common practice to keep separate databases for financial data. Security, backups are often better handled in per company silos.
精彩评论