From: Jerome Knobl <jknobl@mandanet.ch>
To: pgsql-sql@postgreSQL.org
Subject: How can I optimize a research on text field?
Date: Fri, 30 Oct 1998 16:38:55 +0100
Message-ID: <3639DD8F.2CB99B94@mandanet.ch> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jknobl@mandanet.ch
Subject: Re: How can I optimize a research on text field?
In-Reply-To: <3639DD8F.2CB99B94@mandanet.ch>
References: <3639DD8F.2CB99B94@mandanet.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox