Re: [GENERAL] Generic search

From: Taral <taral(at)cyberjunkie(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Generic search
Date: 1998-12-04 15:14:44
Message-ID: 98120409165203.00927@taral.dobiecenter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>hygea=> explain select * from comuni where nome = 'A%';
>NOTICE: QUERY PLAN:
>Index Scan using nome_comune_idx on comuni (cost=2.05 size=2 width=84)
>^^^^^

The question was about LIKE, not =. Because LIKE uses regexp-style matching and
we have no substring index functionality, it cannot use the index. If you're
always matching on the first character, you can do something like fulltextindex
does and use triggers and a second (indexed) table to be able to match on the
first character only.

HTH

Taral

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1998-12-04 15:23:44 Re: [GENERAL] compiling postgresql 6.4 in BSDi
Previous Message The Hermit Hacker 1998-12-04 14:59:15 Re: [GENERAL] compiling postgresql 6.4 in BSDi