From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, Taral <taral(at)cyberjunkie(dot)com> |
Subject: | Re[2]: [GENERAL] Generic search |
Date: | 1998-12-04 15:30:35 |
Message-ID: | 17687.981204@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Taral,
venerdì, 4 dicembre 98, you wrote:
>>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)
>>^^^^^
T> The question was about LIKE, not =. Because LIKE uses regexp-style matching and
T> we have no substring index functionality, it cannot use the index. If you're
T> always matching on the first character, you can do something like fulltextindex
T> does and use triggers and a second (indexed) table to be able to match on the
T> first character only.
Sorry, my fault.
hygea=> explain select * from comuni where nome like 'A%';
NOTICE: QUERY PLAN:
Index Scan using nome_comune_idx on comuni (cost=72.34 size=1 width=84)
EXPLAIN
-Jose'-
From | Date | Subject | |
---|---|---|---|
Next Message | José Paumard | 1998-12-04 15:59:09 | Creating a function from C code |
Previous Message | Bruce Momjian | 1998-12-04 15:28:34 | Re: [GENERAL] compiling postgresql 6.4 in BSDi |