Jean-Luc Lachance <jllachan@nsd.ca> writes:
> Hash Join (cost=109.44..118460.53 rows=1 width=857)
> -> Seq Scan on c (cost=0.00..112409.04 rows=1156604 width=519)
> -> Hash (cost=109.44..109.44 rows=1 width=338)
> -> Merge Join (cost=0.00..109.44 rows=1 width=338)
> -> Index Scan using routes_str_mun on routes r
> (cost=0.00..52.00 rows=1000 width=152)
> -> Index Scan using rs_stname on rs s (cost=0.00..52.00
> rows=1000 width=186)
Have you vacuum analyzed routes and rs? I always disbelieve any plan
with 'rows=1000' in it, because I know that's the default assumption
when no stats are available...
regards, tom lane