java Derby/JavaDB 与 SQLiteJDBC

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2714326/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 22:29:19  来源:igfitidea点击:

Derby/JavaDB vs SQLiteJDBC

javasqlitederbyjavadbsqlitejdbc

提问by Tom Brito

I found a lot of comparisions here, but not this one; So, what is best in each one?

我在这里找到了很多比较,但不是这个;那么,每一个中什么是最好的呢?

采纳答案by mgv

There's a full comparison at SQLite's site.

SQLite 的网站上有一个完整的比较。

SQLite is much more restricted, as it only supports a small subset of SQL92, whereas Derby (now JavaDB) has full support of SQL92 and SQL99.

SQLite 受到更多限制,因为它只支持 SQL92 的一小部分,而 Derby(现在是 JavaDB)完全支持 SQL92 和 SQL99。

回答by neverwinter

I execute a complex SQL which has more than 6000 rows 10000 times in my Websphere Server. Total net execution times are like that:

我在我的 Websphere Server 中执行了 10000 次超过 6000 行的复杂 SQL。总净执行时间如下:

          Derby (In Memory)   Oracle(standard DB) SQLite (In Memory)  HSQLDb (In Memory)
          nano sec.  second    nano sec.  second  nano sec.  second   nano sec. second
1. try    58000000    0,058   6149976000   6,1    1141988000   1,14   999403000    1,00
2. try    78560000    0,078   5268477000   5,2    1182621000   1,18   1338705000   1,34
3. try    58849000    0,058   5200898000   5,2    1133003000   1,13   2239527000   2,24
4. try    60901000    0,06    5435216000   5,4    1205442000   1,21   1370711000   1,37
5. try    58798000    0,058   6501929000   6,5    1186734000   1,19   1001800000   1,00
6. try    62928000    0,062   5913053000   5,9    1224470000   1,22   1066736000   1,07
7. try    71171000    0,071   5111207000   5,1    1200769000   1,20   1304524000   1,30
8. try    66913000    0,066   5517989000   5,5    1173495000   1,17   1299230000   1,30
9. try    58777000    0,058   7209555000   7,2    1179013000   1,18   1031795000   1,03
10. try   75299000    0,075   5356514000   5,3    1182715000   1,18   1368461000   1,37
average   65019600    0,064   5766481400   5,7    1181025000   1,18   1302089200   1,30
          Derby (In Memory)   Oracle(standard DB) SQLite (In Memory)  HSQLDb (In Memory)
          nano sec.  second    nano sec.  second  nano sec.  second   nano sec. second
1. try    58000000    0,058   6149976000   6,1    1141988000   1,14   999403000    1,00
2. try    78560000    0,078   5268477000   5,2    1182621000   1,18   1338705000   1,34
3. try    58849000    0,058   5200898000   5,2    1133003000   1,13   2239527000   2,24
4. try    60901000    0,06    5435216000   5,4    1205442000   1,21   1370711000   1,37
5. try    58798000    0,058   6501929000   6,5    1186734000   1,19   1001800000   1,00
6. try    62928000    0,062   5913053000   5,9    1224470000   1,22   1066736000   1,07
7. try    71171000    0,071   5111207000   5,1    1200769000   1,20   1304524000   1,30
8. try    66913000    0,066   5517989000   5,5    1173495000   1,17   1299230000   1,30
9. try    58777000    0,058   7209555000   7,2    1179013000   1,18   1031795000   1,03
10. try   75299000    0,075   5356514000   5,3    1182715000   1,18   1368461000   1,37
average   65019600    0,064   5766481400   5,7    1181025000   1,18   1302089200   1,30

I obviously compare Derby, SQLite and HSQLDB. Oracle isn't a in memory db. But I put it's result to table because to show speed difference between a in memory db and normal db.

我显然比较了 Derby、SQLite 和 HSQLDB。Oracle 不是内存数据库。但我把它的结果放在表中,因为要显示内存数据库和普通数据库之间的速度差异。

PS: In SQLite and HSQLDB results aren't stable. So I choosed 10 stable results in 100 tries. Sometimes HSQLDB is faster than SQLite. I think theirs performance are same.

PS:在 SQLite 和 HSQLDB 中结果不稳定。所以我在 100 次尝试中选择了 10 个稳定的结果。有时 HSQLDB 比 SQLite 更快。我认为他们的表现是一样的。