Первоначальный коммит

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
poignatov-home
2026-02-08 17:01:36 +03:00
commit bad198ce29
217 changed files with 57075 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
-- Migration: Optimize task queries with composite index
-- Date: 2026-01-24
--
-- This migration adds a composite index to optimize the task detail query:
-- WHERE id = $1 AND user_id = $2 AND deleted = FALSE
--
-- The index uses a partial index with WHERE deleted = FALSE to reduce index size
-- and improve query performance for active (non-deleted) tasks.
CREATE INDEX IF NOT EXISTS idx_tasks_id_user_deleted
ON tasks(id, user_id, deleted)
WHERE deleted = FALSE;
COMMENT ON INDEX idx_tasks_id_user_deleted IS 'Composite index for optimizing task detail queries with id, user_id, and deleted filter. Partial index for non-deleted tasks only.';