The WAL file was growing to 700MB+ which caused COUNT(*) queries to timeout. Reads must scan the WAL to find current page versions, and a large WAL makes this slow. Add Checkpoint method to database interface and run PASSIVE checkpoints every 30 seconds via the DBMaintainer. This keeps the WAL small and maintains fast read performance under heavy write load. |
||
|---|---|---|
| .. | ||
| database_test.go | ||
| database.go | ||
| interface.go | ||
| models.go | ||
| schema.sql | ||
| slowquery.go | ||
| utils.go | ||