摘要
针对嵌入式数据库SQLite并发性能较低的问题,提出了一种基于多版本并发控制(MVCC)的并发控制设计。首先,设计了SQLite数据库的以提交的写事务为依据的版本划分方式,重新设计了数据记录的头部字段并以此划分了记录在不同版本访问下的可见性;然后,在SQLite原有结构基础上修改了增、删、查、改等操作与索引结构使得该数据库能在MVCC下工作;最后,对于老旧版本数据提供了一种手动的回收机制。通过实验对比测试了在该设计下的SQLite-MVCC数据库与SQLite数据库的性能区别,发现在并发度较高的状态下SQLite-MVCC数据库在相同时间内可多完成70%以上的事务。实验结果验证了所提设计可以有效提高SQLite的并发性能,使得该数据库可以应对并发情况下的需求。
In order to solve the problem of low concurrency performance of embedded database SQLite,a concurrency control design based on Multi-Version Concurrency Control(MVCC)was proposed.Firstly,the version division method of SQLite database based on committed write transactions was designed,and the header field of data records was redesigned to divide the visibility of records under different version accesses.Then,based on the original structure of SQLite,the operations such as add,delete,check and change and the index structure were modified to make the database work under MVCC.Finally,a manual recycling mechanism was provided to handle old version data.Experiments were designed to compare and test the performance difference between SQLite-MVCC database obtained by the above design and SQLite database.It can be seen that in the state of high concurrency,SQLite-MVCC database can complete 70%more transactions in the same time.Experimental results verify that the proposed design can effectively improve the concurrency performance of SQLite,to meet the needs in concurrent case.
作者
景子奇
邹兆年
JING Ziqi;ZOU Zhaonian(School of Computer Science and Technology,Harbin Institute of Technology,Harbin Heilongjiang 150001,China)
出处
《计算机应用》
CSCD
北大核心
2022年第1期140-147,共8页
journal of Computer Applications
基金
国家自然科学基金资助项目(62072138)。
关键词
嵌入式数据库SQLITE
事务管理
调度
多版本并发控制
并发执行
embedded database SQLite
transaction management
scheduling
Multi-Version Concurrency Control(MVCC)
concurrent execution