routewatch/internal/database
sneak 1f8ececedf Optimize database write performance
- Use SQLite UPSERT for UpdateLiveRoute to eliminate SELECT+UPDATE/INSERT pattern
- Add connection string optimizations (synchronous=NORMAL, cache_size)
- Add WAL checkpoint configuration for better write performance
- Add index on live_routes(id) for UPDATE operations
- Set WAL autocheckpoint to 1000 pages

These changes should reduce write amplification and improve overall
throughput by:
1. Reducing from 2 queries to 1 for route updates
2. Better WAL checkpoint management
3. More efficient UPDATE operations with dedicated index
2025-07-27 22:42:49 +02:00
..
database.go Optimize database write performance 2025-07-27 22:42:49 +02:00
interface.go Remove BGP keepalive logging and add peer tracking 2025-07-27 21:54:58 +02:00
models.go Initial commit: RouteWatch BGP stream monitor 2025-07-27 21:18:57 +02:00
schema.sql Optimize database write performance 2025-07-27 22:42:49 +02:00
slowquery.go Increase slow query threshold to 50ms 2025-07-27 22:40:32 +02:00
utils.go Initial commit: RouteWatch BGP stream monitor 2025-07-27 21:18:57 +02:00