"Marc G. Fournier" <scrappy@hub.org> writes:
> -> Index Scan using clubs_idx on clubs c (cost=0.00..1695474.62 rows=26569 width=64) (actual time=0.48..1936.95
rows=23510loops=1)
This indexscan cost estimate is completely out of whack, it would seem.
Have you done an ANALYZE on this table recently? If so, what do you get
fromselect * from pg_stats where tablename = 'clubs';select * from pg_class where relname = 'clubs';
regards, tom lane