Hello,
What index method can I use for a text field to have a better
optimisation.
I tried btree and hash method, but when I make a clause like : where nom
like '%PICASSO%'; the request don't use any index!?!
example:
mayer98=> explain select count(*) from artistes, oeuvres where
artistes.ref=oeuvres.refartiste and nom like '%PICASSO%';
NOTICE: QUERY PLAN:
Aggregate (cost=4894.04 size=0 width=0)
-> Nested Loop (cost=4894.04 size=874 width=8)
-> Seq Scan on artistes (cost=4837.37 size=1 width=4)
-> Index Scan on oeuvres (cost=56.67 size=685510 width=4)
EXPLAIN
Jérôme Knöbl