简体   繁体   English

东京内阁:.tcb.wal文件与.tcb文件一起创建。 删除记录时,db大小不会减小

[英]tokyo cabinet: .tcb.wal file created along with .tcb file. Db size doesnot decreases while deleting records

I am using tokyo cabinets B+ tree API to create a lookup database. 我正在使用东京橱柜B +树API创建查找数据库。 On linux environment I see a .tcb.wal file created along with the actual .tcb database file. 在linux环境中,我看到创建了一个.tcb.wal文件以及实际的.tcb数据库文件。 The size of this file is 0. I wonder whether its a lock file that is created to help synchronization. 该文件的大小为0。我想知道它是否是一个用于帮助同步的锁定文件。 Also when I delete records from the database the size of the file does not decrease. 同样,当我从数据库中删除记录时,文件的大小不会减少。 Any reasons why its behaving like that? 有什么原因使其表现如此?

The extension .wal stands for Write Ahead Logging file. 扩展名.wal代表预写日志文件。 This file is only relevant if you use any transaction functions; 仅当您使用任何交易功能时,此文件才相关。 most applications do not use these. 大多数应用程序不使用这些。 (For details, search for "ahead" in the documentation.) (有关详细信息,请在文档中搜索“ ahead”。)

The file size does not change for every deletion for efficiency reasons. 出于效率考虑,文件大小不会因每次删除而改变。 Similarly, if you create an empty database, it will reserve space for faster insertions. 同样,如果您创建一个空数据库,它将为快速插入保留空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM