1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.import
sqliteimport
console;-
var
db = sqlite("C:\Users\Administrator\Desktop\test-sqlite.db"
); if
( not
db.existsTable("film"
) ){ - db.exec(
"CREATE TABLE [film](title, length, year, starring);"
); - }
var
tm = time
.tick()- db.beginTrans()
for
(i=1
;10000
;1
){- db.exec(
"INSERT INTO film(title,length,year) VALUES(@title,@length,@year)"
,{ - title =
"标题"
; - length =
4
; - year =
time
.now(); - })
- }
- db.commitTrans()
- tm =
time
.tick()-tm - console.dump(db.getTable(
"SELECT count(*) FROM [film] "
),tm) - db.close()
- console.pause();