Files
grotti/grotti/migrations/002_indexes.sql
T
Dominic Gundel 0236278929 Grotti 3.0 Phase 1: Migrationen, Pool, Queue- und Abzug-Fixes.
Nummerierte SQL-Migrationen, psycopg-Pool, waitress, hängende Queue-Jobs,
sichere History-Abzüge, Chargen-Locks, Upload-/Host-Validierung, ProxyFix.
2026-10-18 00:47:23 +02:00

7 lines
448 B
SQL

-- Heiße Abfragepfade für Sends, Läufe, Dateien und Ereignisse.
CREATE INDEX IF NOT EXISTS sends_host_filename ON sends (printer_host, filename);
CREATE INDEX IF NOT EXISTS sends_host_file ON sends (printer_host, file_id);
CREATE INDEX IF NOT EXISTS runs_host_state ON runs (printer_host, state);
CREATE INDEX IF NOT EXISTS files_name ON files (name);
CREATE INDEX IF NOT EXISTS events_host_kind_created ON events (host, kind, created_at DESC);