mysql 数据库 最大限制吗,可以在mysql中创建的数据库的最大限制?

can i create as many as 500000000 databases in Mysql??

If yes, is it efficient??

here, each database holds user data with 6 tables in it containing user info in it..

please explain me the pros and cons of this idea with respect to performance and implementation..

解决方案

Please Don't!

Whatever you're thinking, whatever the reason. There is absolutely no way that creating that many databases is a good idea.

If you're looking for storing data per user, or for every X. Then please take a look again at what a relational database is "A relational database matches data by using common characteristics found within the data set."

Let's say you're createing an image service and want each user to have their own images. One way is to give each user their own database. This is wrong, because the data for each user contains the same characteristics, the only thing that is different is the relation (user A has picture A, user B has picture B), (1 user has 0...* pictures, and 1 picture belongs to 1 user). So instead of creating that many databases, you create a user table, and relate that to a picture table, this way you've efficiently used a database.

To answer your more direct question. Create a table with 50.000 entries is surely more efficient then creating 50.000 databases.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值