As far as I know the index is only used when you do a prefix search, for
example
col like 'xyz%'
I think that if you are looking for expressions such as 'A%B', you could
rephrase them like this:
col like 'A%' AND col like 'A%B'
So the database could use the index to narrow down the result a
Yantao Shi <[EMAIL PROTECTED]> writes:
> testdbspc=# explain select file_name from catalog where file_name like
> 'MOD04_L2.A2005311.%.004.2005312013%.hdf';
> QUERY PLAN
> Seq Scan on catalog (cost=0.00..429.00 rows=1 width=404)
> Filter: (file_name ~~ 'MOD04_L2.A2005311.%.004.2005312013%.hdf':