> ------------- shell script -------------------
> for i in 32 64 128 256 512 1024 2048 4096 8192
> do
> psql -c "explain analyze select liketest(a,'aaa') from
> (select substring('very_long_text' from 0 for $i) as a) as a" test
> done
> ------------- shell script -------------------
I don't think your search string is sufficient for a test.
With 'aaa' it actually knows that it only needs to look at the
first three characters of a. Imho you need to try something
like liketest(a,'%aaa%').
Andreas