本来还想会不会自动压缩 /索引 /优化,就测试了一下。
temp1 = []
temp2 = []
for i in range(100000):
temp1.append({'key': i})
temp2.append({'very_loooooooooooooooooooooooooooooooooooooooooong_key': i})
db['key_test1'].insert_many(temp1)
db['key_test2'].insert_many(temp2)
结果
- test1, sorageSize:1.3M, size:2.7M, totalIndexSize:0.74M
- test2, sorageSize:2.2M, size:7.0M, totalIndexSize:0.74M
唉,为了自己以前任性的字段命名低头……
难不成将来为了省空间还要搞个文档,map 个简称?
PS:又想到鼓吹中文编程的那个……
