-- Migration: Add index on player name for faster search queries
-- Created: 2026-02-06
--
-- Performance improvement for /players/search endpoint
-- Reduces all-seasons search from 15+ seconds to <500ms
--
-- This migration adds a functional index on LOWER(name) to speed up
-- case-insensitive search queries like:
--   SELECT * FROM player WHERE LOWER(name) LIKE '%search%'

CREATE INDEX IF NOT EXISTS idx_player_name_lower ON player(LOWER(name));
