Skip to content

Conversation

@jairajdev
Copy link
Contributor

Optimize account update path and tune SQLite for better performance

  • Add queryAccountTimestamp(accountId) to fetch only the timestamp
  • Update Collector to enqueue account updates only when newer than existing timestamp, avoiding redundant writes
  • Tune SQLite PRAGMAs: synchronous=NORMAL, temp_store=MEMORY, cache_size≈64MB, wal_autocheckpoint=1000 (retain WAL mode)
  • Replace INSERT OR REPLACE with ON CONFLICT for timestamp-based account updates

- Add queryAccountTimestamp(accountId) to fetch only the timestamp
- Update Collector to enqueue account updates only when newer than existing timestamp, avoiding redundant writes
- Tune SQLite PRAGMAs: synchronous=NORMAL, temp_store=MEMORY, cache_size≈64MB, wal_autocheckpoint=1000 (retain WAL mode)
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@jairajdev jairajdev merged commit 9d72232 into dev Nov 26, 2025
4 of 5 checks passed
@jairajdev jairajdev deleted the tuning-db-perf branch November 26, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants