Skip to content

Latest commit

 

History

History
375 lines (345 loc) · 22.3 KB

File metadata and controls

375 lines (345 loc) · 22.3 KB

数据库基准测试报告

测试时间: 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%

性能对比总览

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

操作类型 操作名称 MongoDB MySQL PostgreSQL SQLite SQLServer 最快
Aggregation GroupBy 46.60 49.80 16.60 41.20 50.00 PostgreSQL
Aggregation Statistics 61.20 63.20 59.40 103.40 71.60 PostgreSQL
Batch Delete 585.00 583.00 356.20 208.80 6199.80 SQLite
Batch Insert 665.80 4869.20 8474.80 5440.80 48878.40 MongoDB
Batch Select 354.80 444.20 116.60 262.80 238.20 PostgreSQL
Batch Update 2745.60 5841.80 13650.40 6429.60 55636.60 MongoDB
Single Delete 5382.60 34411.80 8443.00 22035.80 14398.40 MongoDB
Single Insert 3643.60 34740.00 8809.60 22154.60 14133.40 MongoDB
Single Select 5157.00 10363.40 3572.80 997.60 8769.00 SQLite
Single Update 5809.00 35385.00 9299.20 22420.20 23418.60 MongoDB

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

操作类型 操作名称 MongoDB MySQL PostgreSQL SQLite SQLServer 最快
Aggregation GroupBy 21.47 20.28 72.78 24.27 20.01 PostgreSQL
Aggregation Statistics 16.40 97.05 103.11 58.06 83.92 PostgreSQL
Batch Delete 170960.00 172283.20 307275.06 481439.38 16164.99 SQLite
Batch Insert 150216.97 20704.24 11859.68 18383.08 2045.91 MongoDB
Batch Select 281952.74 225445.75 861613.08 380631.84 419970.83 PostgreSQL
Batch Update 36427.62 17188.02 7344.70 15553.18 1797.40 MongoDB
Single Delete 1858.03 290.62 1184.46 453.85 694.61 MongoDB
Single Insert 2744.92 287.92 1135.21 451.39 707.70 MongoDB
Single Select 1939.24 965.21 2799.37 10026.79 1140.47 SQLite
Single Update 1721.75 282.65 1079.03 446.37 427.17 MongoDB

各数据库详细结果

MongoDB

操作类型 操作名称 记录数 耗时(ms) OPS CPU(%) 内存增量 状态
Aggregation GroupBy 8 47 21.28 1.37 0 B
Aggregation GroupBy 8 48 20.83 0.00 0 B
Aggregation GroupBy 8 46 21.74 0.00 8 KB
Aggregation GroupBy 8 46 21.74 0.00 0 B
Aggregation GroupBy 8 46 21.74 0.00 136 KB
Aggregation Statistics 100,000 68 14.71 1.90 760 KB
Aggregation Statistics 100,000 62 16.13 0.00 0 B
Aggregation Statistics 100,000 59 16.95 0.00 0 B
Aggregation Statistics 100,000 59 16.95 0.00 0 B
Aggregation Statistics 100,000 58 17.24 1.11 0 B
Batch Delete 100,000 587 170357.75 0.44 7.02 MB
Batch Delete 100,000 594 168350.17 0.88 8.65 MB
Batch Delete 100,000 582 171821.31 0.56 4.74 MB
Batch Delete 100,000 587 170357.75 0.22 9.11 MB
Batch Delete 100,000 575 173913.04 0.79 6.04 MB
Batch Insert 100,000 656 152439.02 1.49 25.63 MB
Batch Insert 100,000 672 148809.52 1.26 18.14 MB
Batch Insert 100,000 658 151975.68 1.68 21.52 MB
Batch Insert 100,000 677 147710.49 1.83 21.57 MB
Batch Insert 100,000 666 150150.15 1.47 15.84 MB
Batch Select 100,000 342 292397.66 3.23 11.3 MB
Batch Select 100,000 357 280112.04 2.73 11.1 MB
Batch Select 100,000 362 276243.09 3.60 8.05 MB
Batch Select 100,000 356 280898.88 2.01 13.01 MB
Batch Select 100,000 357 280112.04 2.73 11.05 MB
Batch Update 100,000 2,744 36443.15 1.57 12.65 MB
Batch Update 100,000 2,799 35727.05 1.47 18.08 MB
Batch Update 100,000 2,764 36179.45 1.55 21.13 MB
Batch Update 100,000 2,699 37050.76 1.52 7.62 MB
Batch Update 100,000 2,722 36737.69 1.39 15.18 MB
Single Delete 10,000 5,355 1867.41 1.73 0 B
Single Delete 10,000 5,324 1878.29 1.99 2.79 MB
Single Delete 10,000 5,348 1869.86 1.98 0 B
Single Delete 10,000 5,474 1826.82 1.68 0 B
Single Delete 10,000 5,412 1847.75 1.95 4.09 MB
Single Insert 10,000 3,605 2773.93 2.08 11.11 MB
Single Insert 10,000 3,600 2777.78 1.61 0 B
Single Insert 10,000 3,714 2692.51 1.67 0 B
Single Insert 10,000 3,628 2756.34 1.74 2.12 MB
Single Insert 10,000 3,671 2724.05 1.15 0 B
Single Select 10,000 5,148 1942.50 2.63 0 B
Single Select 10,000 5,088 1965.41 2.96 656 KB
Single Select 10,000 5,197 1924.19 2.39 0 B
Single Select 10,000 5,145 1943.63 2.66 0 B
Single Select 10,000 5,207 1920.49 2.88 4.65 MB
Single Update 10,000 5,698 1755.00 2.19 11.9 MB
Single Update 10,000 5,776 1731.30 2.21 7.79 MB
Single Update 10,000 5,816 1719.39 2.40 9.16 MB
Single Update 10,000 5,825 1716.74 2.10 4.52 MB
Single Update 10,000 5,930 1686.34 2.25 4.43 MB

MySQL

操作类型 操作名称 记录数 耗时(ms) OPS CPU(%) 内存增量 状态
Aggregation GroupBy 8 60 16.67 0.00 108 KB
Aggregation GroupBy 8 46 21.74 0.00 276 KB
Aggregation GroupBy 8 49 20.41 0.00 0 B
Aggregation GroupBy 8 46 21.74 0.00 0 B
Aggregation GroupBy 8 48 20.83 0.00 128 KB
Aggregation Statistics 100,000 83 72.29 2.35 1.38 MB
Aggregation Statistics 100,000 56 107.14 0.00 0 B
Aggregation Statistics 100,000 63 95.24 0.00 12 KB
Aggregation Statistics 100,000 58 103.45 0.00 48 KB
Aggregation Statistics 100,000 56 107.14 0.00 84 KB
Batch Delete 100,000 664 150602.41 1.37 14.59 MB
Batch Delete 100,000 565 176991.15 0.92 7.02 MB
Batch Delete 100,000 566 176678.45 0.69 12.96 MB
Batch Delete 100,000 559 178890.88 0.70 12.07 MB
Batch Delete 100,000 561 178253.12 0.46 10.35 MB
Batch Insert 100,000 4,681 21362.96 2.81 13.5 MB
Batch Insert 100,000 4,442 22512.38 3.21 13.52 MB
Batch Insert 100,000 4,737 21110.41 2.84 11.81 MB
Batch Insert 100,000 5,770 17331.02 2.29 11.47 MB
Batch Insert 100,000 4,716 21204.41 2.79 14.69 MB
Batch Select 100,000 452 221238.94 2.73 17.68 MB
Batch Select 100,000 469 213219.62 2.64 3.13 MB
Batch Select 100,000 444 225225.23 2.34 3.43 MB
Batch Select 100,000 418 239234.45 2.33 1.64 MB
Batch Select 100,000 438 228310.50 3.27 9.52 MB
Batch Update 100,000 5,499 18185.12 2.28 7.88 MB
Batch Update 100,000 6,307 15855.40 1.95 4.61 MB
Batch Update 100,000 5,436 18395.88 2.23 6.93 MB
Batch Update 100,000 5,694 17562.35 2.17 5.9 MB
Batch Update 100,000 6,273 15941.34 1.94 2.6 MB
Single Delete 10,000 34,111 293.16 0.50 0 B
Single Delete 10,000 34,256 291.92 0.56 0 B
Single Delete 10,000 34,514 289.74 0.49 0 B
Single Delete 10,000 34,886 286.65 0.53 0 B
Single Delete 10,000 34,292 291.61 0.50 0 B
Single Insert 10,000 34,194 292.45 0.64 3.2 MB
Single Insert 10,000 35,313 283.18 0.62 0 B
Single Insert 10,000 34,213 292.29 0.63 0 B
Single Insert 10,000 34,550 289.44 0.55 0 B
Single Insert 10,000 35,430 282.25 0.58 1.88 MB
Single Select 10,000 10,297 971.16 2.00 1.16 MB
Single Select 10,000 10,533 949.40 1.95 0 B
Single Select 10,000 10,608 942.68 1.71 5.13 MB
Single Select 10,000 10,214 979.05 1.69 0 B
Single Select 10,000 10,165 983.77 2.04 3.68 MB
Single Update 10,000 35,181 284.24 0.62 8.36 MB
Single Update 10,000 35,224 283.90 0.60 6.56 MB
Single Update 10,000 35,151 284.49 0.54 7.18 MB
Single Update 10,000 35,140 284.58 0.58 6.34 MB
Single Update 10,000 36,229 276.02 0.54 5.88 MB

PostgreSQL

操作类型 操作名称 记录数 耗时(ms) OPS CPU(%) 内存增量 状态
Aggregation GroupBy 8 10 100.00 0.00 44 KB
Aggregation GroupBy 8 34 29.41 0.00 88 KB
Aggregation GroupBy 8 15 66.67 0.00 68 KB
Aggregation GroupBy 8 11 90.91 0.00 60 KB
Aggregation GroupBy 8 13 76.92 0.00 100 KB
Aggregation Statistics 100,000 50 120.00 0.00 200 KB
Aggregation Statistics 100,000 69 86.96 0.00 40 KB
Aggregation Statistics 100,000 66 90.91 0.00 4 KB
Aggregation Statistics 100,000 63 95.24 0.00 0 B
Aggregation Statistics 100,000 49 122.45 1.33 0 B
Batch Delete 100,000 189 529100.53 1.37 7.7 MB
Batch Delete 100,000 414 241545.89 0.31 7.81 MB
Batch Delete 100,000 387 258397.93 0.50 6.66 MB
Batch Delete 100,000 418 239234.45 0.31 8.09 MB
Batch Delete 100,000 373 268096.51 0.52 5.31 MB
Batch Insert 100,000 9,006 11103.71 1.08 19.69 MB
Batch Insert 100,000 7,507 13320.90 1.21 14.62 MB
Batch Insert 100,000 8,971 11147.03 1.25 19.11 MB
Batch Insert 100,000 8,809 11352.03 1.10 19.44 MB
Batch Insert 100,000 8,081 12374.71 1.26 16.75 MB
Batch Select 100,000 118 847457.63 3.85 25.43 MB
Batch Select 100,000 124 806451.61 3.15 22.19 MB
Batch Select 100,000 108 925925.93 4.21 19.45 MB
Batch Select 100,000 107 934579.44 4.23 27.42 MB
Batch Select 100,000 126 793650.79 3.60 22.04 MB
Batch Update 100,000 13,495 7410.15 0.79 0 B
Batch Update 100,000 14,496 6898.45 0.72 0 B
Batch Update 100,000 13,658 7321.72 0.90 0 B
Batch Update 100,000 12,482 8011.54 0.94 0 B
Batch Update 100,000 14,121 7081.65 0.77 0 B
Single Delete 10,000 8,499 1176.61 1.05 3.7 MB
Single Delete 10,000 8,394 1191.33 1.08 6.63 MB
Single Delete 10,000 8,499 1176.61 1.10 2.75 MB
Single Delete 10,000 8,363 1195.74 1.14 6.55 MB
Single Delete 10,000 8,460 1182.03 1.00 6.37 MB
Single Insert 10,000 8,769 1140.38 1.42 0 B
Single Insert 10,000 8,695 1150.09 1.53 0 B
Single Insert 10,000 8,858 1128.92 1.25 0 B
Single Insert 10,000 8,919 1121.20 1.36 1.66 MB
Single Insert 10,000 8,807 1135.46 1.09 0 B
Single Select 10,000 3,553 2814.52 2.77 732 KB
Single Select 10,000 3,548 2818.49 2.81 4 KB
Single Select 10,000 3,646 2742.73 3.43 1 MB
Single Select 10,000 3,517 2843.33 2.67 4.96 MB
Single Select 10,000 3,600 2777.78 3.02 4.99 MB
Single Update 10,000 9,087 1100.47 1.27 10.93 MB
Single Update 10,000 8,949 1117.44 1.27 11.18 MB
Single Update 10,000 10,428 958.96 1.17 12.2 MB
Single Update 10,000 9,019 1108.77 1.30 12.18 MB
Single Update 10,000 9,013 1109.51 1.30 10.98 MB

SQLite

操作类型 操作名称 记录数 耗时(ms) OPS CPU(%) 内存增量 状态
Aggregation GroupBy 8 42 23.81 4.59 868 KB
Aggregation GroupBy 8 41 24.39 4.67 0 B
Aggregation GroupBy 8 41 24.39 4.72 0 B
Aggregation GroupBy 8 41 24.39 3.12 812 KB
Aggregation GroupBy 8 41 24.39 4.69 1.05 MB
Aggregation Statistics 100,000 108 55.56 4.19 36 KB
Aggregation Statistics 100,000 100 60.00 4.55 0 B
Aggregation Statistics 100,000 102 58.82 3.80 0 B
Aggregation Statistics 100,000 104 57.69 4.36 24 KB
Aggregation Statistics 100,000 103 58.25 4.38 0 B
Batch Delete 100,000 201 497512.44 4.19 2.55 MB
Batch Delete 100,000 238 420168.07 3.28 0 B
Batch Delete 100,000 196 510204.08 4.63 4.07 MB
Batch Delete 100,000 197 507614.21 3.95 0 B
Batch Delete 100,000 212 471698.11 3.37 4.17 MB
Batch Insert 100,000 5,584 17908.31 4.18 9.07 MB
Batch Insert 100,000 5,381 18583.91 4.14 8.69 MB
Batch Insert 100,000 5,382 18580.45 4.17 11.67 MB
Batch Insert 100,000 5,439 18385.73 4.17 8.6 MB
Batch Insert 100,000 5,418 18457.00 4.17 15.95 MB
Batch Select 100,000 269 371747.21 3.86 26.85 MB
Batch Select 100,000 255 392156.86 4.33 23.39 MB
Batch Select 100,000 264 378787.88 4.42 23.42 MB
Batch Select 100,000 264 378787.88 3.94 26.43 MB
Batch Select 100,000 262 381679.39 4.21 26.3 MB
Batch Update 100,000 6,456 15489.47 4.11 6.13 MB
Batch Update 100,000 6,411 15598.19 4.13 10.72 MB
Batch Update 100,000 6,411 15598.19 4.19 6.43 MB
Batch Update 100,000 6,434 15542.43 4.15 6.21 MB
Batch Update 100,000 6,436 15537.60 4.17 4.06 MB
Single Delete 10,000 21,789 458.95 3.30 7.39 MB
Single Delete 10,000 22,009 454.36 3.23 7.68 MB
Single Delete 10,000 21,894 456.75 2.95 2.89 MB
Single Delete 10,000 22,111 452.26 3.18 7.68 MB
Single Delete 10,000 22,376 446.91 3.08 4 MB
Single Insert 10,000 22,122 452.04 3.37 0 B
Single Insert 10,000 22,197 450.51 3.33 2.66 MB
Single Insert 10,000 22,339 447.65 3.15 5.06 MB
Single Insert 10,000 21,966 455.25 2.94 0 B
Single Insert 10,000 22,149 451.49 3.05 7.05 MB
Single Select 10,000 971 10298.66 4.29 556 KB
Single Select 10,000 995 10050.25 4.19 4 MB
Single Select 10,000 1,022 9784.74 4.14 2.88 MB
Single Select 10,000 1,004 9960.16 4.28 4 KB
Single Select 10,000 996 10040.16 4.18 3.18 MB
Single Update 10,000 22,055 453.41 3.36 8.62 MB
Single Update 10,000 23,697 421.99 3.16 4.65 MB
Single Update 10,000 22,102 452.45 3.27 8.99 MB
Single Update 10,000 22,162 451.22 3.16 9.04 MB
Single Update 10,000 22,085 452.80 3.15 8.63 MB

SQLServer

操作类型 操作名称 记录数 耗时(ms) OPS CPU(%) 内存增量 状态
Aggregation GroupBy 8 52 19.23 0.00 52 KB
Aggregation GroupBy 8 50 20.00 1.29 128 KB
Aggregation GroupBy 8 49 20.41 0.00 128 KB
Aggregation GroupBy 8 49 20.41 0.00 8 KB
Aggregation GroupBy 8 50 20.00 2.60 72 KB
Aggregation Statistics 100,000 77 77.92 3.37 1.16 MB
Aggregation Statistics 100,000 69 86.96 0.00 0 B
Aggregation Statistics 100,000 71 84.51 0.00 0 B
Aggregation Statistics 100,000 71 84.51 0.91 56 KB
Aggregation Statistics 100,000 70 85.71 0.00 2.04 MB
Batch Delete 100,000 6,071 16471.75 0.02 3.66 MB
Batch Delete 100,000 6,373 15691.20 0.06 6.61 MB
Batch Delete 100,000 6,531 15311.59 0.01 5.8 MB
Batch Delete 100,000 6,313 15840.33 0.05 6.66 MB
Batch Delete 100,000 5,711 17510.07 0.03 5.66 MB
Batch Insert 100,000 49,078 2037.57 0.09 17.49 MB
Batch Insert 100,000 48,682 2054.15 0.08 10.14 MB
Batch Insert 100,000 48,963 2042.36 0.08 11.07 MB
Batch Insert 100,000 48,728 2052.21 0.08 7.47 MB
Batch Insert 100,000 48,941 2043.28 0.09 5.32 MB
Batch Select 100,000 242 413223.14 4.03 17.31 MB
Batch Select 100,000 232 431034.48 3.93 12.04 MB
Batch Select 100,000 239 418410.04 3.54 7.53 MB
Batch Select 100,000 234 427350.43 4.45 14.19 MB
Batch Select 100,000 244 409836.07 2.67 14.15 MB
Batch Update 100,000 55,319 1807.70 0.10 0 B
Batch Update 100,000 55,510 1801.48 0.11 7.69 MB
Batch Update 100,000 55,758 1793.46 0.11 0 B
Batch Update 100,000 55,710 1795.01 0.11 0 B
Batch Update 100,000 55,886 1789.36 0.10 3.65 MB
Single Delete 10,000 14,435 692.76 0.54 248 KB
Single Delete 10,000 14,484 690.42 0.50 7.61 MB
Single Delete 10,000 14,291 699.74 0.53 3 MB
Single Delete 10,000 14,633 683.39 0.37 0 B
Single Delete 10,000 14,149 706.76 0.47 3.77 MB
Single Insert 10,000 14,358 696.48 0.56 0 B
Single Insert 10,000 13,976 715.51 0.46 0 B
Single Insert 10,000 13,981 715.26 0.56 12 KB
Single Insert 10,000 14,419 693.53 0.50 112 KB
Single Insert 10,000 13,933 717.72 0.37 7.59 MB
Single Select 10,000 8,867 1127.78 0.84 1.19 MB
Single Select 10,000 8,743 1143.77 0.91 0 B
Single Select 10,000 8,752 1142.60 0.98 108 KB
Single Select 10,000 8,835 1131.86 0.99 936 KB
Single Select 10,000 8,648 1156.34 1.19 3.62 MB
Single Update 10,000 23,349 428.28 0.36 6.94 MB
Single Update 10,000 23,020 434.40 0.31 8.04 MB
Single Update 10,000 23,414 427.09 0.35 8.98 MB
Single Update 10,000 24,286 411.76 0.31 7.75 MB
Single Update 10,000 23,024 434.33 0.34 9.41 MB

CPU 消耗对比 (%)

操作类型 操作名称 MongoDB MySQL PostgreSQL SQLite SQLServer
Aggregation GroupBy 0.27 0.00 0.00 4.36 0.78
Aggregation Statistics 0.60 0.47 0.27 4.26 0.86
Batch Delete 0.58 0.83 0.60 3.88 0.03
Batch Insert 1.55 2.79 1.18 4.17 0.08
Batch Select 2.86 2.66 3.81 4.15 3.72
Batch Update 1.50 2.11 0.82 4.15 0.11
Single Delete 1.87 0.52 1.07 3.15 0.48
Single Insert 1.65 0.60 1.33 3.17 0.49
Single Select 2.70 1.88 2.94 4.22 0.98
Single Update 2.23 0.58 1.26 3.22 0.33

内存消耗对比

操作类型 操作名称 MongoDB MySQL PostgreSQL SQLite SQLServer
Aggregation GroupBy 136 KB 276 KB 100 KB 1.05 MB 128 KB
Aggregation Statistics 760 KB 1.38 MB 200 KB 36 KB 2.04 MB
Batch Delete 9.11 MB 14.59 MB 8.09 MB 4.17 MB 6.66 MB
Batch Insert 25.63 MB 14.69 MB 19.69 MB 15.95 MB 17.49 MB
Batch Select 13.01 MB 17.68 MB 27.42 MB 26.85 MB 17.31 MB
Batch Update 21.13 MB 7.88 MB 0 B 10.72 MB 7.69 MB
Single Delete 4.09 MB 0 B 6.63 MB 7.68 MB 7.61 MB
Single Insert 11.11 MB 3.2 MB 1.66 MB 7.05 MB 7.59 MB
Single Select 4.65 MB 5.13 MB 4.99 MB 4 MB 3.62 MB
Single Update 11.9 MB 8.36 MB 12.2 MB 9.04 MB 9.41 MB

详细日志

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


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