免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3797 | 回复: 4

mysql分区问题 [复制链接]

论坛徽章:
0
发表于 2011-07-20 15:16 |显示全部楼层
本帖最后由 johnjobe123 于 2011-07-20 15:21 编辑

mysql edition  5.5
    由于项目的需要,我们要创建比较多的分区(差不多要有20000个吧),但是通过查看文档,发现其最多可以支持1024(加上子分区)各分区,
是不是可以调整,怎么调整,请高手指点。。。。



附文档关于分区个数的内容:

Maximum number of partitions.  The maximum possible number of partitions for a given table is 1024. This includes subpartitions.

If, when creating tables with a large number of partitions (but less than the maximum), you encounter an error message such as Got error ... from storage engine: Out of resources when opening file, you may be able to address the issue by increasing the value of the open_files_limit system variable. However, this is dependent on the operating system, and may not be possible or advisable on all platforms; see Section C.5.2.18, “'File' Not Found and Similar Errors”, for more information. In some cases, using large numbers (hundreds) of partitions may also not be advisable due to other concerns, so using more partitions does not automatically lead to better results.

论坛徽章:
0
发表于 2011-07-20 15:43 |显示全部楼层
Waiting for you answer !!! Thank you !

论坛徽章:
0
发表于 2011-07-21 15:38 |显示全部楼层
The maximum possible number of partitions for a given table is 1024。说的是一个表最多只能有1024个分区,LZ一个表要分出20000多的分区?

论坛徽章:
59
2015七夕节徽章
日期:2015-08-24 11:17:25ChinaUnix专家徽章
日期:2015-07-20 09:19:30每周论坛发贴之星
日期:2015-07-20 09:19:42ChinaUnix元老
日期:2015-07-20 11:04:38荣誉版主
日期:2015-07-20 11:05:19巳蛇
日期:2015-07-20 11:05:26CU十二周年纪念徽章
日期:2015-07-20 11:05:27IT运维版块每日发帖之星
日期:2015-07-20 11:05:34操作系统版块每日发帖之星
日期:2015-07-20 11:05:36程序设计版块每日发帖之星
日期:2015-07-20 11:05:40数据库技术版块每日发帖之星
日期:2015-07-20 11:05:432015年辞旧岁徽章
日期:2015-07-20 11:05:44
发表于 2011-07-23 15:30 |显示全部楼层
太狠了。2W多个分区?

论坛徽章:
0
发表于 2011-07-25 10:49 |显示全部楼层
回复 1# johnjobe123


    除非你重新修改源代码,本人要说的不是如何修改,而是告诉一个测试验证的思考:
,我们要创建比较多的分区(差不多要有20000个吧)

创建的分区过多,性能会急剧下降的.............我曾经创建:父分区为季度,子分区为天,与只有一级分区,为天的同样数据量的测试,发现性能下降明显.....当然其中有子分区,其中一个没有,也存在一些差别

后续又测试了,见31个分区,另外一个键31*12个分区,同样的数据量性能也不一样....下降非常明显....


所以LZ要创建那么多分区,一劳永逸的事情还是别想了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP