What is this issue?
The enable_indexscan setting controls whether the query planner considers
index scans. When disabled:
- All queries use sequential scans
- Indexes are completely ignored
- Performance degrades dramatically on large tables
- Even primary key lookups scan entire tables
This setting is only useful for testing and benchmarking.
Why it matters
Severe Performance Loss
Queries that should take milliseconds take minutes
Resource Waste
CPU, I/O, and memory consumed unnecessarily
Application Timeouts
Queries exceed timeout limits
Wasted Indexes
Index storage provides no benefit
How PG Pilot detects it
```sql SELECT name, setting FROM pg_settings WHERE name = 'enable_indexscan'; ```
How to fix it
1
Enable index scans immediately
ALTER SYSTEM SET enable_indexscan = on;
SELECT pg_reload_conf();
2
Verify query plans improve
Check that queries now use indexes:
EXPLAIN SELECT * FROM users WHERE id = 1;Should show "Index Scan" instead of "Seq Scan".
Prevention
- Never disable enable_indexscan in production
- Only disable for specific benchmarking scenarios
- Monitor configuration with PG Pilot