a789495a98
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
CI / Quality Guardrails (push) Has been cancelled
CI / Build & Test (macos-latest) (push) Has been cancelled
CI / Build & Test (ubuntu-latest) (push) Has been cancelled
CI / Build & Test (windows-latest) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / PowerShell Syntax (push) Has been cancelled
CI / Windows Cross-Target Check (Linux) (push) Has been cancelled
10 lines
433 B
SQL
10 lines
433 B
SQL
-- Composite indexes for telemetry dashboard/read-heavy queries.
|
|
-- D1/SQLite can use these to satisfy event + time filters and distinct telemetry_id
|
|
-- counts without repeatedly scanning the full events table.
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_events_event_created_telemetry
|
|
ON events(event, created_at, telemetry_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_events_event_telemetry_created
|
|
ON events(event, telemetry_id, created_at);
|