perf(clickhouse): P1 TTL migrations, ORDER BY tune, remote_addr normalization

This commit is contained in:
ryan
2026-07-02 15:24:22 +08:00
parent 0e86fe3547
commit caf2ffcff4
7 changed files with 134 additions and 2 deletions
@@ -6,6 +6,7 @@ package analytics
import (
"context"
"fmt"
"strings"
"time"
"github.com/Rain-kl/Wavelet/internal/db"
@@ -41,7 +42,7 @@ func BatchInsertNodeAccessLogs(ctx context.Context, logs []analyticsmodel.NodeAc
id,
logItem.NodeID,
logItem.LoggedAt.UTC(),
logItem.RemoteAddr,
strings.TrimSpace(logItem.RemoteAddr),
logItem.Region,
logItem.Host,
logItem.Path,