当前位置:首页 > 数据库 > SQlite

Python内置数据结构操作VS sqlite3操作

>>> timeit.timeit(‘a in test‘,number=10000,globals=globals()) #globals=globals()保证了全局变量 0.024695289129624598 >>> timeit.timeit(‘c.execute("select * from test where test.value=?",(a,))‘,globals=globals(),number=10000) 0.1466543038781083

 3.结论

内置结构查询速度快。

Python内置数据结构操作VS sqlite3操作

标签:rand   imp   list   table   exe   timeit   随机   primary   插入   

本文系统来源:https://www.cnblogs.com/johnyang/p/12589479.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!