From 397ccd21fe73230ae6b1cc6c2620ec4b2e2c1ee4 Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 27 Jul 2025 22:40:32 +0200 Subject: [PATCH] Increase slow query threshold to 50ms The 10ms threshold was too noisy - queries in the 10-20ms range are actually performing well after the index optimizations. Setting the threshold to 50ms will help identify truly problematic queries. --- internal/database/slowquery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/database/slowquery.go b/internal/database/slowquery.go index 471f307..9c4af75 100644 --- a/internal/database/slowquery.go +++ b/internal/database/slowquery.go @@ -7,7 +7,7 @@ import ( "time" ) -const slowQueryThreshold = 10 * time.Millisecond +const slowQueryThreshold = 50 * time.Millisecond // logSlowQuery logs queries that take longer than slowQueryThreshold func logSlowQuery(logger *slog.Logger, query string, start time.Time) {