psql-mail@freeuk.com writes:
> -> Seq Scan on message (cost=0.00..25.00 rows=5 width=8) (actual time=
> 58.18..410588.49 rows=20839 loops=1)
> Filter: ((header || body) ~~* '%chicken%'::text)
Estimated cost of a seqscan only 25? Have you ever vacuumed or analyzed
that table? The planner evidently thinks it is tiny ...
regards, tom lane