perf(db): add slow-query tracing and composite indexes

This commit is contained in:
2026-02-07 13:44:58 +08:00
parent ff67a9bbab
commit dd7f03ef94
7 changed files with 133 additions and 12 deletions

View File

@@ -25,6 +25,8 @@ DB_WAL_AUTOCHECKPOINT_PAGES=1000
DB_MMAP_SIZE_MB=256
DB_LOCK_RETRY_COUNT=3
DB_LOCK_RETRY_BASE_MS=50
DB_SLOW_QUERY_MS=120
DB_SLOW_QUERY_SQL_MAX_LEN=240
DB_PRAGMA_OPTIMIZE_INTERVAL_SECONDS=21600
DB_ANALYZE_INTERVAL_SECONDS=86400
DB_WAL_CHECKPOINT_INTERVAL_SECONDS=43200