How to force postgres to use index for the following query (I can change the
query to equivalent if required)
select nimi from klient where lower(nimi) like 'test%'
Currently it does NOT use index:
create index nimib2 on firma1.klient(lower(nimi) bpchar_pattern_ops);
explain analyze select
# [EMAIL PROTECTED] / 2006-06-06 11:58:26 +0300:
How to force postgres to use index for the following query (I can change the
query to equivalent if required)
select nimi from klient where lower(nimi) like 'test%'
do you have an index on klient (lower(nimi))?
--
How many Vietnam vets
do you have an index on klient (lower(nimi))?
Yes. As I wrote in first message, I created index explicity for this test
sample:
create index nimib2 on firma1.klient(lower(nimi) bpchar_pattern_ops);
Andrus.
---(end of broadcast)---
TIP 1:
59 68 88 98
Email: [EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrus
Sent: Tuesday, June 06, 2006 10:58 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] How to use index in case insensitive
substing search
How
how about:
create index nimib2 on firma1.klient(lower(nimi) varchar_pattern_ops);
^^^
Hakan, thank you.
Excellent.
It works.
Andrus.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate