数据库基准测试报告

December 9, 2025 · View on GitHub

测试时间: 2025-12-09 13:22:41

服务器信息

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

测试概要

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

性能对比总览

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

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer最快
AggregationGroupBy46.6049.8016.6041.2050.00PostgreSQL
AggregationStatistics61.2063.2059.40103.4071.60PostgreSQL
BatchDelete585.00583.00356.20208.806199.80SQLite
BatchInsert665.804869.208474.805440.8048878.40MongoDB
BatchSelect354.80444.20116.60262.80238.20PostgreSQL
BatchUpdate2745.605841.8013650.406429.6055636.60MongoDB
SingleDelete5382.6034411.808443.0022035.8014398.40MongoDB
SingleInsert3643.6034740.008809.6022154.6014133.40MongoDB
SingleSelect5157.0010363.403572.80997.608769.00SQLite
SingleUpdate5809.0035385.009299.2022420.2023418.60MongoDB

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

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer最快
AggregationGroupBy21.4720.2872.7824.2720.01PostgreSQL
AggregationStatistics16.4097.05103.1158.0683.92PostgreSQL
BatchDelete170960.00172283.20307275.06481439.3816164.99SQLite
BatchInsert150216.9720704.2411859.6818383.082045.91MongoDB
BatchSelect281952.74225445.75861613.08380631.84419970.83PostgreSQL
BatchUpdate36427.6217188.027344.7015553.181797.40MongoDB
SingleDelete1858.03290.621184.46453.85694.61MongoDB
SingleInsert2744.92287.921135.21451.39707.70MongoDB
SingleSelect1939.24965.212799.3710026.791140.47SQLite
SingleUpdate1721.75282.651079.03446.37427.17MongoDB

各数据库详细结果

MongoDB

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy84721.281.370 B
AggregationGroupBy84820.830.000 B
AggregationGroupBy84621.740.008 KB
AggregationGroupBy84621.740.000 B
AggregationGroupBy84621.740.00136 KB
AggregationStatistics100,0006814.711.90760 KB
AggregationStatistics100,0006216.130.000 B
AggregationStatistics100,0005916.950.000 B
AggregationStatistics100,0005916.950.000 B
AggregationStatistics100,0005817.241.110 B
BatchDelete100,000587170357.750.447.02 MB
BatchDelete100,000594168350.170.888.65 MB
BatchDelete100,000582171821.310.564.74 MB
BatchDelete100,000587170357.750.229.11 MB
BatchDelete100,000575173913.040.796.04 MB
BatchInsert100,000656152439.021.4925.63 MB
BatchInsert100,000672148809.521.2618.14 MB
BatchInsert100,000658151975.681.6821.52 MB
BatchInsert100,000677147710.491.8321.57 MB
BatchInsert100,000666150150.151.4715.84 MB
BatchSelect100,000342292397.663.2311.3 MB
BatchSelect100,000357280112.042.7311.1 MB
BatchSelect100,000362276243.093.608.05 MB
BatchSelect100,000356280898.882.0113.01 MB
BatchSelect100,000357280112.042.7311.05 MB
BatchUpdate100,0002,74436443.151.5712.65 MB
BatchUpdate100,0002,79935727.051.4718.08 MB
BatchUpdate100,0002,76436179.451.5521.13 MB
BatchUpdate100,0002,69937050.761.527.62 MB
BatchUpdate100,0002,72236737.691.3915.18 MB
SingleDelete10,0005,3551867.411.730 B
SingleDelete10,0005,3241878.291.992.79 MB
SingleDelete10,0005,3481869.861.980 B
SingleDelete10,0005,4741826.821.680 B
SingleDelete10,0005,4121847.751.954.09 MB
SingleInsert10,0003,6052773.932.0811.11 MB
SingleInsert10,0003,6002777.781.610 B
SingleInsert10,0003,7142692.511.670 B
SingleInsert10,0003,6282756.341.742.12 MB
SingleInsert10,0003,6712724.051.150 B
SingleSelect10,0005,1481942.502.630 B
SingleSelect10,0005,0881965.412.96656 KB
SingleSelect10,0005,1971924.192.390 B
SingleSelect10,0005,1451943.632.660 B
SingleSelect10,0005,2071920.492.884.65 MB
SingleUpdate10,0005,6981755.002.1911.9 MB
SingleUpdate10,0005,7761731.302.217.79 MB
SingleUpdate10,0005,8161719.392.409.16 MB
SingleUpdate10,0005,8251716.742.104.52 MB
SingleUpdate10,0005,9301686.342.254.43 MB

MySQL

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy86016.670.00108 KB
AggregationGroupBy84621.740.00276 KB
AggregationGroupBy84920.410.000 B
AggregationGroupBy84621.740.000 B
AggregationGroupBy84820.830.00128 KB
AggregationStatistics100,0008372.292.351.38 MB
AggregationStatistics100,00056107.140.000 B
AggregationStatistics100,0006395.240.0012 KB
AggregationStatistics100,00058103.450.0048 KB
AggregationStatistics100,00056107.140.0084 KB
BatchDelete100,000664150602.411.3714.59 MB
BatchDelete100,000565176991.150.927.02 MB
BatchDelete100,000566176678.450.6912.96 MB
BatchDelete100,000559178890.880.7012.07 MB
BatchDelete100,000561178253.120.4610.35 MB
BatchInsert100,0004,68121362.962.8113.5 MB
BatchInsert100,0004,44222512.383.2113.52 MB
BatchInsert100,0004,73721110.412.8411.81 MB
BatchInsert100,0005,77017331.022.2911.47 MB
BatchInsert100,0004,71621204.412.7914.69 MB
BatchSelect100,000452221238.942.7317.68 MB
BatchSelect100,000469213219.622.643.13 MB
BatchSelect100,000444225225.232.343.43 MB
BatchSelect100,000418239234.452.331.64 MB
BatchSelect100,000438228310.503.279.52 MB
BatchUpdate100,0005,49918185.122.287.88 MB
BatchUpdate100,0006,30715855.401.954.61 MB
BatchUpdate100,0005,43618395.882.236.93 MB
BatchUpdate100,0005,69417562.352.175.9 MB
BatchUpdate100,0006,27315941.341.942.6 MB
SingleDelete10,00034,111293.160.500 B
SingleDelete10,00034,256291.920.560 B
SingleDelete10,00034,514289.740.490 B
SingleDelete10,00034,886286.650.530 B
SingleDelete10,00034,292291.610.500 B
SingleInsert10,00034,194292.450.643.2 MB
SingleInsert10,00035,313283.180.620 B
SingleInsert10,00034,213292.290.630 B
SingleInsert10,00034,550289.440.550 B
SingleInsert10,00035,430282.250.581.88 MB
SingleSelect10,00010,297971.162.001.16 MB
SingleSelect10,00010,533949.401.950 B
SingleSelect10,00010,608942.681.715.13 MB
SingleSelect10,00010,214979.051.690 B
SingleSelect10,00010,165983.772.043.68 MB
SingleUpdate10,00035,181284.240.628.36 MB
SingleUpdate10,00035,224283.900.606.56 MB
SingleUpdate10,00035,151284.490.547.18 MB
SingleUpdate10,00035,140284.580.586.34 MB
SingleUpdate10,00036,229276.020.545.88 MB

PostgreSQL

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy810100.000.0044 KB
AggregationGroupBy83429.410.0088 KB
AggregationGroupBy81566.670.0068 KB
AggregationGroupBy81190.910.0060 KB
AggregationGroupBy81376.920.00100 KB
AggregationStatistics100,00050120.000.00200 KB
AggregationStatistics100,0006986.960.0040 KB
AggregationStatistics100,0006690.910.004 KB
AggregationStatistics100,0006395.240.000 B
AggregationStatistics100,00049122.451.330 B
BatchDelete100,000189529100.531.377.7 MB
BatchDelete100,000414241545.890.317.81 MB
BatchDelete100,000387258397.930.506.66 MB
BatchDelete100,000418239234.450.318.09 MB
BatchDelete100,000373268096.510.525.31 MB
BatchInsert100,0009,00611103.711.0819.69 MB
BatchInsert100,0007,50713320.901.2114.62 MB
BatchInsert100,0008,97111147.031.2519.11 MB
BatchInsert100,0008,80911352.031.1019.44 MB
BatchInsert100,0008,08112374.711.2616.75 MB
BatchSelect100,000118847457.633.8525.43 MB
BatchSelect100,000124806451.613.1522.19 MB
BatchSelect100,000108925925.934.2119.45 MB
BatchSelect100,000107934579.444.2327.42 MB
BatchSelect100,000126793650.793.6022.04 MB
BatchUpdate100,00013,4957410.150.790 B
BatchUpdate100,00014,4966898.450.720 B
BatchUpdate100,00013,6587321.720.900 B
BatchUpdate100,00012,4828011.540.940 B
BatchUpdate100,00014,1217081.650.770 B
SingleDelete10,0008,4991176.611.053.7 MB
SingleDelete10,0008,3941191.331.086.63 MB
SingleDelete10,0008,4991176.611.102.75 MB
SingleDelete10,0008,3631195.741.146.55 MB
SingleDelete10,0008,4601182.031.006.37 MB
SingleInsert10,0008,7691140.381.420 B
SingleInsert10,0008,6951150.091.530 B
SingleInsert10,0008,8581128.921.250 B
SingleInsert10,0008,9191121.201.361.66 MB
SingleInsert10,0008,8071135.461.090 B
SingleSelect10,0003,5532814.522.77732 KB
SingleSelect10,0003,5482818.492.814 KB
SingleSelect10,0003,6462742.733.431 MB
SingleSelect10,0003,5172843.332.674.96 MB
SingleSelect10,0003,6002777.783.024.99 MB
SingleUpdate10,0009,0871100.471.2710.93 MB
SingleUpdate10,0008,9491117.441.2711.18 MB
SingleUpdate10,00010,428958.961.1712.2 MB
SingleUpdate10,0009,0191108.771.3012.18 MB
SingleUpdate10,0009,0131109.511.3010.98 MB

SQLite

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy84223.814.59868 KB
AggregationGroupBy84124.394.670 B
AggregationGroupBy84124.394.720 B
AggregationGroupBy84124.393.12812 KB
AggregationGroupBy84124.394.691.05 MB
AggregationStatistics100,00010855.564.1936 KB
AggregationStatistics100,00010060.004.550 B
AggregationStatistics100,00010258.823.800 B
AggregationStatistics100,00010457.694.3624 KB
AggregationStatistics100,00010358.254.380 B
BatchDelete100,000201497512.444.192.55 MB
BatchDelete100,000238420168.073.280 B
BatchDelete100,000196510204.084.634.07 MB
BatchDelete100,000197507614.213.950 B
BatchDelete100,000212471698.113.374.17 MB
BatchInsert100,0005,58417908.314.189.07 MB
BatchInsert100,0005,38118583.914.148.69 MB
BatchInsert100,0005,38218580.454.1711.67 MB
BatchInsert100,0005,43918385.734.178.6 MB
BatchInsert100,0005,41818457.004.1715.95 MB
BatchSelect100,000269371747.213.8626.85 MB
BatchSelect100,000255392156.864.3323.39 MB
BatchSelect100,000264378787.884.4223.42 MB
BatchSelect100,000264378787.883.9426.43 MB
BatchSelect100,000262381679.394.2126.3 MB
BatchUpdate100,0006,45615489.474.116.13 MB
BatchUpdate100,0006,41115598.194.1310.72 MB
BatchUpdate100,0006,41115598.194.196.43 MB
BatchUpdate100,0006,43415542.434.156.21 MB
BatchUpdate100,0006,43615537.604.174.06 MB
SingleDelete10,00021,789458.953.307.39 MB
SingleDelete10,00022,009454.363.237.68 MB
SingleDelete10,00021,894456.752.952.89 MB
SingleDelete10,00022,111452.263.187.68 MB
SingleDelete10,00022,376446.913.084 MB
SingleInsert10,00022,122452.043.370 B
SingleInsert10,00022,197450.513.332.66 MB
SingleInsert10,00022,339447.653.155.06 MB
SingleInsert10,00021,966455.252.940 B
SingleInsert10,00022,149451.493.057.05 MB
SingleSelect10,00097110298.664.29556 KB
SingleSelect10,00099510050.254.194 MB
SingleSelect10,0001,0229784.744.142.88 MB
SingleSelect10,0001,0049960.164.284 KB
SingleSelect10,00099610040.164.183.18 MB
SingleUpdate10,00022,055453.413.368.62 MB
SingleUpdate10,00023,697421.993.164.65 MB
SingleUpdate10,00022,102452.453.278.99 MB
SingleUpdate10,00022,162451.223.169.04 MB
SingleUpdate10,00022,085452.803.158.63 MB

SQLServer

操作类型操作名称记录数耗时(ms)OPSCPU(%)内存增量状态
AggregationGroupBy85219.230.0052 KB
AggregationGroupBy85020.001.29128 KB
AggregationGroupBy84920.410.00128 KB
AggregationGroupBy84920.410.008 KB
AggregationGroupBy85020.002.6072 KB
AggregationStatistics100,0007777.923.371.16 MB
AggregationStatistics100,0006986.960.000 B
AggregationStatistics100,0007184.510.000 B
AggregationStatistics100,0007184.510.9156 KB
AggregationStatistics100,0007085.710.002.04 MB
BatchDelete100,0006,07116471.750.023.66 MB
BatchDelete100,0006,37315691.200.066.61 MB
BatchDelete100,0006,53115311.590.015.8 MB
BatchDelete100,0006,31315840.330.056.66 MB
BatchDelete100,0005,71117510.070.035.66 MB
BatchInsert100,00049,0782037.570.0917.49 MB
BatchInsert100,00048,6822054.150.0810.14 MB
BatchInsert100,00048,9632042.360.0811.07 MB
BatchInsert100,00048,7282052.210.087.47 MB
BatchInsert100,00048,9412043.280.095.32 MB
BatchSelect100,000242413223.144.0317.31 MB
BatchSelect100,000232431034.483.9312.04 MB
BatchSelect100,000239418410.043.547.53 MB
BatchSelect100,000234427350.434.4514.19 MB
BatchSelect100,000244409836.072.6714.15 MB
BatchUpdate100,00055,3191807.700.100 B
BatchUpdate100,00055,5101801.480.117.69 MB
BatchUpdate100,00055,7581793.460.110 B
BatchUpdate100,00055,7101795.010.110 B
BatchUpdate100,00055,8861789.360.103.65 MB
SingleDelete10,00014,435692.760.54248 KB
SingleDelete10,00014,484690.420.507.61 MB
SingleDelete10,00014,291699.740.533 MB
SingleDelete10,00014,633683.390.370 B
SingleDelete10,00014,149706.760.473.77 MB
SingleInsert10,00014,358696.480.560 B
SingleInsert10,00013,976715.510.460 B
SingleInsert10,00013,981715.260.5612 KB
SingleInsert10,00014,419693.530.50112 KB
SingleInsert10,00013,933717.720.377.59 MB
SingleSelect10,0008,8671127.780.841.19 MB
SingleSelect10,0008,7431143.770.910 B
SingleSelect10,0008,7521142.600.98108 KB
SingleSelect10,0008,8351131.860.99936 KB
SingleSelect10,0008,6481156.341.193.62 MB
SingleUpdate10,00023,349428.280.366.94 MB
SingleUpdate10,00023,020434.400.318.04 MB
SingleUpdate10,00023,414427.090.358.98 MB
SingleUpdate10,00024,286411.760.317.75 MB
SingleUpdate10,00023,024434.330.349.41 MB

CPU 消耗对比 (%)

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer
AggregationGroupBy0.270.000.004.360.78
AggregationStatistics0.600.470.274.260.86
BatchDelete0.580.830.603.880.03
BatchInsert1.552.791.184.170.08
BatchSelect2.862.663.814.153.72
BatchUpdate1.502.110.824.150.11
SingleDelete1.870.521.073.150.48
SingleInsert1.650.601.333.170.49
SingleSelect2.701.882.944.220.98
SingleUpdate2.230.581.263.220.33

内存消耗对比

操作类型操作名称MongoDBMySQLPostgreSQLSQLiteSQLServer
AggregationGroupBy136 KB276 KB100 KB1.05 MB128 KB
AggregationStatistics760 KB1.38 MB200 KB36 KB2.04 MB
BatchDelete9.11 MB14.59 MB8.09 MB4.17 MB6.66 MB
BatchInsert25.63 MB14.69 MB19.69 MB15.95 MB17.49 MB
BatchSelect13.01 MB17.68 MB27.42 MB26.85 MB17.31 MB
BatchUpdate21.13 MB7.88 MB0 B10.72 MB7.69 MB
SingleDelete4.09 MB0 B6.63 MB7.68 MB7.61 MB
SingleInsert11.11 MB3.2 MB1.66 MB7.05 MB7.59 MB
SingleSelect4.65 MB5.13 MB4.99 MB4 MB3.62 MB
SingleUpdate11.9 MB8.36 MB12.2 MB9.04 MB9.41 MB

详细日志

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


报告生成时间: 2025-12-09 13:22:41