PostgreSQL: Advanced SQL: Improving performance at the SQL level
Use of min/max aggregates (unqualified)
Requires sequential scan
Use method for count(*) OR
SELECT id FROM tbl ORDER by 1 [ASC | DESC] LIMIT 1;
Prev
Next
Page 36