[Switch] Performance Comparison Between SQLite database and other databases
This article Reprinted from: http://www.sqlite.com.cn/MySqlite/6/22.HtmlPerformance Comparison Between SQLite databases and other databases This is an article from a traditional blog: http://blog.joycode.com/fish/archive/2004/08/13/30653.aspx Performance Tuning between MySQL (myodbc/bytefx), SQLite (V3), access (2003), and MSSQL (2000sp3) Today, I wrote a simple test program to understand the performance of the database I currently use and hope to get a better result from it. The results of Multiple tests are as follows: Test environment: Windows2003,. NET Framework 1.1, no antivirus, 1 GB memory Tested Database: SQLite V3, MySQL type = InnoDB, SQL Server 2000 SP3, access 20003 Parameter settings: MySQL (logging * 2) Max_allowed_packet = 16 m Key_buffer_size = 16 m Table_cache = 128 Sort_buffer_size = 4 m Other options are preset values. Database connection string: Private mssqlconnstr as string = "Initial catalog = codelib; Connect timeout = 20; Data Source = (local); Integrated Security = sspi; persist Security info = false ;" Private mysqlodbcconnstr as string = "driver = {MySQL ODBC 3.51 driver}; database = codelib; option = 18475; server = localhost; uid =; Password = ;" Private mysqlbytefxconnstr as string = "database = codelib; Data Source = localhost; user id =; Password =" Private oledbconnstr as string = "provider = Microsoft. Jet. oledb.4.0; Data Source = 1.mdb" Private sqliteconnstr as string = "Data Source =; new = true; version = 3"
Insert with transaction 10000Pen record: 00.6089 (SQLite) <01.1677 (MSSQL) <02.5346 (bytefx) <08.9000 (ACCESS) <13.9242 (myodbc) 0 ~ 10000 00.5476 (SQLite) <01.2679 (MSSQL) <02.4982 (bytefx) <08.6672 (ACCESS) <13.5140 (myodbc) 10000 ~ 20000 00.5245 (SQLite) <01.1508 (MSSQL) <02.5150 (bytefx) <08.7101 (ACCESS) <13.6411 (myodbc) 20000 ~ 30000 Insert with transaction 50000Pen record: 03.4739 (SQLite) <09.4173 (MSSQL) <13.6408 (bytefx) <44.3165 (ACCESS) <71.6529 (myodbc) 50000 Insert without transaction 300 records: 00.0908 (MSSQL) <00.3520 (ACCESS) <10.3717 (myodbc) <11.5118 (bytefx) <25.8230 (SQLite) 30000 ~ 30300 00.0907 (MSSQL) <00.3686 (ACCESS) <08.7148 (bytefx) <11.3625 (myodbc) <25.1898 (SQLite) 30300 ~ 30600 00.1027 (MSSQL) <00.3595 (ACCESS) <08.4664 (bytefx) <08.7934 (myodbc) <25.3364 (SQLite) 30600 ~ 31200 Select 1, 31200Pen record: 00.4161 (SQLite) <00.8362 (MSSQL) <00.8688 (ACCESS) <02.3565 (myodbc) <02.4857 (bytefx) 00.3519 (SQLite) <00.5707 (ACCESS) <00.7055 (MSSQL) <02.5555 (myodbc) <02.6173 (bytefx) 00.3472 (SQLite) <00.6037 (MSSQL) <00.6707 (ACCESS) <02.5439 (bytefx) <02.6328 (myodbc) Select 1, 50000Pen record: 00.6129 (SQLite) <01.0132 (MSSQL) <01.2942 (ACCESS) <04.0064 (bytefx) <04.4904 (myodbc) 00.6741 (SQLite) <00.9719 (MSSQL) <01.2956 (ACCESS) <03.7336 (bytefx) <04.6592 (myodbc) Delete 31200Pen record: 00.0091 (ACCESS) <00.0247 (bytefx) <00.1960 (SQLite) <00.6901 (MSSQL) <01.2297 (myodbc) Delete 50000Pen record: 00.0092 (ACCESS) <00.0301 (bytefx) <00.3305 (SQLite) <01.9281 (myodbc) <03.0269 (MSSQL) The above results show that: Sqlite3 is not ideal in the case of no execution of row transaction processing, but the select speed is quite fast. MSSQL/access does not guarantee transaction processing performance. MySQL's bytefx and myodbc differ slightly in the insert/delete speed. The above data is for reference only. If you have better suggestions for the results, please let me know. SQLite is a tragedy in the absence of transactions, because its multi-access support is based on the exclusive and sharing of files. SQLite and other database performance comparison can see the official network: http://www.sqlite.org/speed.html |