Patrick Clery <patrick(at)phpforhire(dot)com> writes:
> Here's the query plan:
> ...
> -> Seq Scan on people_locations (cost=0.00..20.00
> rows=1000 width=122)
The query planner evidently does not know that the people_locations
table is large. A VACUUM or ANALYZE on it would help a lot.
regards, tom lane