【发布时间】:2011-01-09 10:59:54
【问题描述】:
begin transaction;
create table person_id(person_id integer primary key);
insert into person_id values(1);
... snip ...
insert into person_id values(50000);
commit;
这段代码在我的机器上大约需要 0.9 秒,并创建一个占用 392K 的 db 文件。如果我将第二行更改为
,这些数字将变为 1.4 秒和 864Kcreate table person_id(person_id integer nonclustered primary key);
为什么会这样?
【问题讨论】:
标签: performance sqlite clustered-index