How can I optimize a research on text field?

From: Jerome Knobl <jknobl(at)mandanet(dot)ch>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: How can I optimize a research on text field?
Date: 1998-10-30 15:38:55
Message-ID: 3639DD8F.2CB99B94@mandanet.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Mike Meyer 1998-10-30 18:20:14 Re: [SQL] How can I optimize a research on text field?
Previous Message Petter Reinholdtsen 1998-10-30 14:40:11 Access rights to sequence.nextval?