extremedb--calc

本文介绍了dbcalc工具如何帮助开发者实验不同的数据库模式,并提供了一些关于页面大小推荐的基本指导原则。通过调整数据分布、索引分布等参数,开发者可以了解内存在数据库中的分布情况,从而优化数据库性能。

dbcalc”is a tool that helps a developer to experiment with different schemas. Itcannot and was never intended to answer the question "what is the optimalpage size for my schema?". Please understand that the optimal page size isderived from balancing the database object sizes and database performance. Forexample, a smaller page size conserves space for dynamic objects (strings,vectors and blobs) but increases object allocation time and causes larger indextrees that can make lookup operations slower.

Dbcalcis intended to help a developer experiment with different data distributionsamong the database classes, different key distributions between indexes andetc. This tool creates and populates a database with the given schema and thenprints database statistics that gives the developer an idea about the fullpicture of memory distribution in the database. Yes, it prints some page sizerecommendation but this is very rough. The only way to determine a good pagesize is to experiment and refine it.

Inyour case you are using persistent storage; that reduces the number of optionswrt the page size. The disk page size has to be power of two and should beequal to the block size of file system used to store the storage/log files.This usually leaves only two options: 4096 or 8192. The memory page size has tobe power of two if persistent storage is used and has to fit into the disk pagesize, so you have options of 128 or 256 bytes really. So in your case the onlyway to make the database smaller is to get rid of unused or rarely used indexes(eg. the lists?) and think about your use of dynamic fields. eXtremeDB uses atree-like allocator for dynamic objects which means that if the page size is128 bytes and a class has an int and a string and the string is 5 bytes longthen each instance of this class will take an entire 128 byte page. Very oftenchanging from  dynamic to static fields can save significant space. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值