数据库基准测试报告

December 9, 2025 · View on GitHub

测试时间: 2025-12-09 18:24:49

服务器信息

项目
机器名称DESKTOP-RLEON3G
操作系统Microsoft Windows 10.0.19045
OS 架构X64
进程架构X64
处理器数量24
.NET 版本.NET 8.0.20
总内存31.81 GB
采集时间2025-12-09 18:24:49

测试概要

项目
测试数据库MySQL, SQLServer, PostgreSQL, SQLite, MongoDB
数据库数量5
总测试用例数100
成功用例数100
失败用例数0
成功率100.00%

性能对比总览

操作耗时对比 (毫秒 - 越小越好)

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer最快
AggregationGroupBy232.50257.5038.00208.0054.50PostgreSQL
AggregationStatistics307.50260.00191.00545.50118.00SQLServer
BatchDelete2967.003293.001783.50978.0025357.00SQLite
BatchInsert3538.0030198.5083543.5037584.00251540.50MongoDB
BatchSelect2983.004131.501051.504429.502864.50PostgreSQL
BatchUpdate15253.5031195.0063698.5035118.00289606.50MongoDB
SingleDelete5818.5035009.008967.0025420.5016562.00MongoDB
SingleInsert4056.0035841.5010261.5025300.0015474.00MongoDB
SingleSelect5457.0010429.003466.001654.009370.00SQLite
SingleUpdate6056.0036275.0012978.5026186.0026187.00MongoDB

每秒操作数对比 (OPS - 越大越好)

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer最快
AggregationGroupBy4.303.9226.614.8118.38PostgreSQL
AggregationStatistics3.2523.1032.1611.0050.86SQLServer
BatchDelete168708.22151860.78281087.47511255.9919729.65SQLite
BatchInsert141457.0516577.725985.0014387.241988.18MongoDB
BatchSelect167616.57121022.36475710.05125101.46175800.09PostgreSQL
BatchUpdate32780.1716034.287871.9914245.201726.88MongoDB
SingleDelete1720.20285.691115.24398.01605.48MongoDB
SingleInsert2469.82279.02980.49398.44647.27MongoDB
SingleSelect1832.62959.212885.226969.161070.01SQLite
SingleUpdate1651.28275.72774.10385.80382.90MongoDB

各数据库详细结果

MongoDB

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy82314.330.0032 KB
AggregationGroupBy82344.270.0044 KB
AggregationStatistics500,0003103.230.21748 KB
AggregationStatistics500,0003053.280.000 B
BatchDelete500,0002,868174337.520.5221.63 MB
BatchDelete500,0003,066163078.930.4519.28 MB
BatchInsert500,0003,647137098.991.5231.8 MB
BatchInsert500,0003,429145815.111.3731.6 MB
BatchSelect500,0002,985167504.191.579.86 MB
BatchSelect500,0002,981167728.951.810 B
BatchUpdate500,00015,17832942.421.4743.94 MB
BatchUpdate500,00015,32932617.911.4737.01 MB
SingleDelete10,0005,6441771.791.917.16 MB
SingleDelete10,0005,9931668.611.930 B
SingleInsert10,0004,2262366.301.636.13 MB
SingleInsert10,0003,8862573.341.313.89 MB
SingleSelect10,0005,4991818.512.04892 KB
SingleSelect10,0005,4151846.722.140 B
SingleUpdate10,0006,0341657.282.0112.07 MB
SingleUpdate10,0006,0781645.282.043.78 MB

MySQL

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy82324.311.681.83 MB
AggregationGroupBy82833.530.461.02 MB
AggregationStatistics500,00026822.390.482.01 MB
AggregationStatistics500,00025223.810.000 B
BatchDelete500,0003,334149970.010.6610.74 MB
BatchDelete500,0003,252153751.540.527.69 MB
BatchInsert500,00031,26315993.352.2314.1 MB
BatchInsert500,00029,13417162.082.3217.07 MB
BatchSelect500,0004,120121359.221.495.03 MB
BatchSelect500,0004,143120685.491.5212.5 MB
BatchUpdate500,00030,58816346.282.103.01 MB
BatchUpdate500,00031,80215722.282.025.49 MB
SingleDelete10,00034,535289.560.510 B
SingleDelete10,00035,483281.830.53120 KB
SingleInsert10,00035,591280.970.622.35 MB
SingleInsert10,00036,092277.070.590 B
SingleSelect10,00010,628940.912.032.46 MB
SingleSelect10,00010,230977.521.860 B
SingleUpdate10,00035,816279.200.6211.42 MB
SingleUpdate10,00036,734272.230.565.39 MB

PostgreSQL

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy84223.810.0012 KB
AggregationGroupBy83429.410.00304 KB
AggregationStatistics500,00022027.270.88848 KB
AggregationStatistics500,00016237.040.40400 KB
BatchDelete500,0001,875266666.670.695.68 MB
BatchDelete500,0001,692295508.270.777.67 MB
BatchInsert500,00083,2156008.531.2918.76 MB
BatchInsert500,00083,8725961.471.2620.46 MB
BatchSelect500,0001,073465983.222.7928.3 MB
BatchSelect500,0001,030485436.893.3528.28 MB
BatchUpdate500,00067,1057451.012.014.12 MB
BatchUpdate500,00060,2928292.972.170 B
SingleDelete10,0008,9201121.081.133.79 MB
SingleDelete10,0009,0141109.390.993.71 MB
SingleInsert10,00011,063903.910.990 B
SingleInsert10,0009,4601057.081.1611.58 MB
SingleSelect10,0003,4522896.872.512.11 MB
SingleSelect10,0003,4802873.562.963.59 MB
SingleUpdate10,00013,863721.340.894.68 MB
SingleUpdate10,00012,094826.860.8610.96 MB

SQLite

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy82114.744.313.65 MB
AggregationGroupBy82054.884.120 B
AggregationStatistics500,00054710.974.283.15 MB
AggregationStatistics500,00054411.034.0728 KB
BatchDelete500,000974513347.024.614.26 MB
BatchDelete500,000982509164.973.917.87 MB
BatchInsert500,00047,89910438.634.1416.37 MB
BatchInsert500,00027,26918335.844.136.22 MB
BatchSelect500,0005,81485999.314.1918.05 MB
BatchSelect500,0003,045164203.614.0614.02 MB
BatchUpdate500,00035,92313918.664.1325.44 MB
BatchUpdate500,00034,31314571.744.1125.03 MB
SingleDelete10,00028,162355.093.608.72 MB
SingleDelete10,00022,679440.943.15376 KB
SingleInsert10,00027,563362.813.501.98 MB
SingleInsert10,00023,037434.083.257.09 MB
SingleSelect10,0002,2564432.624.245.35 MB
SingleSelect10,0001,0529505.704.083.86 MB
SingleUpdate10,00028,824346.933.520 B
SingleUpdate10,00023,548424.663.388.07 MB

SQLServer

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy85717.542.28700 KB
AggregationGroupBy85219.230.001.4 MB
AggregationStatistics500,00011651.721.12432 KB
AggregationStatistics500,00012050.000.00696 KB
BatchDelete500,00024,75220200.390.062.53 MB
BatchDelete500,00025,96219258.920.077.04 MB
BatchInsert500,000247,8442017.400.099.35 MB
BatchInsert500,000255,2371958.960.1522.93 MB
BatchSelect500,0002,623190621.432.0317.48 MB
BatchSelect500,0003,106160978.752.356.64 MB
BatchUpdate500,000285,2421752.900.1612.74 MB
BatchUpdate500,000293,9711700.850.200 B
SingleDelete10,00015,688637.430.482.83 MB
SingleDelete10,00017,436573.530.490 B
SingleInsert10,00016,088621.580.450 B
SingleInsert10,00014,860672.950.44308 KB
SingleSelect10,0009,8471015.540.734.11 MB
SingleSelect10,0008,8931124.480.97260 KB
SingleUpdate10,00027,549362.990.324.85 MB
SingleUpdate10,00024,825402.820.388.02 MB

CPU 消耗对比 (%)

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer
AggregationGroupBy0.001.070.004.211.14
AggregationStatistics0.100.240.644.180.56
BatchDelete0.480.590.734.260.07
BatchInsert1.452.271.274.130.12
BatchSelect1.691.503.074.122.19
BatchUpdate1.472.062.094.120.18
SingleDelete1.920.521.063.380.48
SingleInsert1.470.601.073.380.45
SingleSelect2.091.942.734.160.85
SingleUpdate2.020.590.883.450.35

内存消耗对比

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer
AggregationGroupBy44 KB1.83 MB304 KB3.65 MB1.4 MB
AggregationStatistics748 KB2.01 MB848 KB3.15 MB696 KB
BatchDelete21.63 MB10.74 MB7.67 MB7.87 MB7.04 MB
BatchInsert31.8 MB17.07 MB20.46 MB16.37 MB22.93 MB
BatchSelect9.86 MB12.5 MB28.3 MB18.05 MB17.48 MB
BatchUpdate43.94 MB5.49 MB4.12 MB25.44 MB12.74 MB
SingleDelete7.16 MB120 KB3.79 MB8.72 MB2.83 MB
SingleInsert6.13 MB2.35 MB11.58 MB7.09 MB308 KB
SingleSelect892 KB2.46 MB3.59 MB5.35 MB4.11 MB
SingleUpdate12.07 MB11.42 MB10.96 MB8.07 MB8.02 MB

详细日志

完整的测试日志请查看 logs/benchmark_20251209.log 文件。


报告生成时间: 2025-12-09 18:24:49