_out.log 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ========== 1. 打开数据库 ==========
  2. 表创建/打开成功
  3. ========== 2. 插入 200000 行 (禁用防抖, 仅脏页阈值触发) ==========
  4. [DEBUG] Header: TablePage=2 NextFreePage=147 FreePageStart=0 FirstWAL=0 LastWAL=0 NextTxn=1
  5. [DEBUG] BufferPool: total=145 dirty=145
  6. [ 20000行] Alloc=5.3MB Total=3132.5MB 耗时=0.6s
  7. [DEBUG] Header: TablePage=2 NextFreePage=286 FreePageStart=0 FirstWAL=0 LastWAL=0 NextTxn=1
  8. [DEBUG] BufferPool: total=284 dirty=284
  9. [ 40000行] Alloc=9.1MB Total=6304.1MB 耗时=1.0s
  10. [DEBUG] Header: TablePage=2 NextFreePage=425 FreePageStart=0 FirstWAL=0 LastWAL=0 NextTxn=1
  11. [DEBUG] BufferPool: total=423 dirty=423
  12. [ 60000行] Alloc=12.8MB Total=9474.5MB 耗时=1.5s
  13. [DEBUG] Header: TablePage=2 NextFreePage=1003 FreePageStart=563 FirstWAL=0 LastWAL=0 NextTxn=2
  14. [DEBUG] BufferPool: total=65 dirty=65
  15. [ 80000行] Alloc=3.2MB Total=12678.7MB 耗时=2.1s
  16. [DEBUG] Header: TablePage=2 NextFreePage=1003 FreePageStart=703 FirstWAL=0 LastWAL=0 NextTxn=2
  17. [DEBUG] BufferPool: total=205 dirty=205
  18. [100000行] Alloc=7.0MB Total=15853.9MB 耗时=2.6s
  19. [DEBUG] Header: TablePage=2 NextFreePage=1003 FreePageStart=842 FirstWAL=0 LastWAL=0 NextTxn=2
  20. [DEBUG] BufferPool: total=344 dirty=344
  21. [120000行] Alloc=13.5MB Total=19027.1MB 耗时=3.1s
  22. [DEBUG] Header: TablePage=2 NextFreePage=1003 FreePageStart=980 FirstWAL=0 LastWAL=0 NextTxn=2
  23. [DEBUG] BufferPool: total=482 dirty=482
  24. [140000行] Alloc=15.2MB Total=22199.3MB 耗时=3.5s
  25. [DEBUG] Header: TablePage=2 NextFreePage=1499 FreePageStart=1119 FirstWAL=0 LastWAL=0 NextTxn=3
  26. [DEBUG] BufferPool: total=125 dirty=125
  27. [160000行] Alloc=5.0MB Total=25407.0MB 耗时=4.2s
  28. [DEBUG] Header: TablePage=2 NextFreePage=1499 FreePageStart=1259 FirstWAL=0 LastWAL=0 NextTxn=3
  29. [DEBUG] BufferPool: total=265 dirty=265
  30. [180000行] Alloc=10.7MB Total=28581.2MB 耗时=4.7s
  31. [DEBUG] Header: TablePage=2 NextFreePage=1499 FreePageStart=1397 FirstWAL=0 LastWAL=0 NextTxn=3
  32. [DEBUG] BufferPool: total=403 dirty=403
  33. [200000行] Alloc=15.3MB Total=31753.8MB 耗时=5.1s
  34. 插入完成: 耗时=5.1s, Alloc=7.4MB
  35. ========== 3. 手动 Commit ==========
  36. Commit 耗时: 0.1s
  37. ========== 4. 验证行数 ==========
  38. 当前行数: 200000 (期望 200000)
  39. ✅ 行数正确
  40. ========== 5. 关闭 → 重开验证 ==========
  41. 重开后行数: 200000 (期望 200000)
  42. ✅ 数据完整持久化
  43. ========== 6. 抽查数据 ==========
  44. Row#1: Name=user_0 Age=20 Score=0 Dept=dept_0
  45. Row#200000: Name=user_199999 Age=69 Score=999 Dept=dept_9
  46. ========== 总结 ==========
  47. 最终 Alloc=1.9MB, TotalAlloc=32012.8MB
  48. 插入耗时: 5.1s
  49. 脏页阈值: 10000 页 (≈156MB)
  50. ✅ 内存控制良好 (< 200MB), 脏页阈值生效!