- Add covering index for SELECT id queries (avoids table lookups) - Add stats index for COUNT queries on live_routes - Add index on asns.number for ASN lookups - Add index on bgp_peers.peer_ip for peer lookups These indexes should further reduce query times, especially: - The covering index includes the id column, eliminating the need to access the table after index lookup - The stats index helps with COUNT(*) queries - The asns.number index speeds up ASN lookups in transactions |
||
|---|---|---|
| .. | ||
| database.go | ||
| interface.go | ||
| models.go | ||
| schema.sql | ||
| slowquery.go | ||
| utils.go | ||