issues
search
gqqnbig
/
cs145project
0
stars
2
forks
source link
比较sqlite和其他数据库的性能
#13
Closed
gqqnbig
closed
4 years ago
gqqnbig
commented
4 years ago
单位是秒
SQLite3
MySQL
SQL Server
Insert into Ratings
executemany
100000行
0.253
0.249
2.075
1.671
16.988
Insert into Ratings
values ,,,
100000行
('HY000', 'The driver did not supply an error!')
Insert into Ratings
values ,,,
分批
100000行
0.546
1.140
7.949
Insert into Ratings
executemany
31.256
Insert into Ratings
values ,,,
分批
62.223
132.963
数据库自带的导入文件工具
257
SELECT count(*) FROM Ratings
join MovieYearGenres on Ratings.movieId=MovieYearGenres.id
34.226
17.594
0.401
所以看起来数据库插入越慢,查询越快 😰
gqqnbig
commented
4 years ago
MySQL、SQLite3的DDL语句似乎自带commit。SQL Server没有。
executemany
100000行
0.249
1.671
values ,,,
100000行
values ,,,
分批
100000行
executemany
values ,,,
分批
join MovieYearGenres on Ratings.movieId=MovieYearGenres.id
所以看起来数据库插入越慢,查询越快 😰