PostgreSQL takes AccessShareLock on every index during query planning, regardless of actual use. On tables with many indexes, this causes CPU-eating lock contention at high query rates when more than 16 locks exceed fast-path capacity and overflow into the shared lock table. Prepared statements eliminate the problem by skipping the planner and locking only relations actually used.