Martin Hampl <Martin(dot)Hampl(at)gmx(dot)de> writes:
> Index Scan using word_lower_idx on token (cost=0.00..98814.08
> rows=25382 width=16)
> Index Cond: (lower((word)::text) = 'saxophone'::text)
The rows estimate (and therefore also the cost estimate) is a complete
guess in this situation, because the system keeps no statistics about
the values of lower(word). Improving this situation is on the TODO list.
regards, tom lane