Re: INDEX and LIKE

Поиск
Список
Период
Сортировка
От Olivier Hubaut
Тема Re: INDEX and LIKE
Дата
Msg-id opsh8a6gzu94ope3@olivier.amaze.ulb.ac.be
обсуждение исходный текст
Ответ на INDEX and LIKE  (T E Schmitz <mailreg@numerixtechnology.de>)
Список pgsql-sql
On Mon, 29 Nov 2004 12:19:12 +0000, T E Schmitz  
<mailreg@numerixtechnology.de> wrote:

> Hello,
>
> I need to be able to perform wildcard searches on a VARCHAR(100) column  
> of the form
>
> SELECT * FROM item WHERE serial_no LIKE '%12345678%'
>
> Would an index on serial_no do anything at all for this search?
>
No, It wouldn't. If you use "%" for the beginning of you search pattern, a  
seqential search is performed, ignoring the index wich use the beginning  
of the string in order to create it's B-tree.


-- 
Downloading signature ... 99%
*CRC FAILED*
signature aborted


В списке pgsql-sql по дате отправления:

Предыдущее
От: T E Schmitz
Дата:
Сообщение: INDEX and LIKE
Следующее
От: sreejith s
Дата:
Сообщение: Crystal Report + Bytea field