Re: best practices with index on varchar column

Поиск
Список
Период
Сортировка
От PFC
Тема Re: best practices with index on varchar column
Дата
Msg-id op.sn1ccygeth1vuj@localhost
обсуждение исходный текст
Ответ на best practices with index on varchar column  ("Layet Benjamin" <benjamin@moonfactory.co.jp>)
Ответы Re: best practices with index on varchar column  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: best practices with index on varchar column  ("Michael Ryan S. Puncia" <mpuncia@census.gov.ph>)
Список pgsql-performance
> Can I use an index on a varchar column to optimize the SELECT queries
> that
> use " column LIKE 'header%'  "?

    Yes

> If yes what is the best tree algotithm to use ?

    Btree

    Note that if you want case insensitive matching you need to make an index
on lower(column) and SELECT WHERE lower(column) LIKE 'header%'

    Locales may bite you.

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

Предыдущее
От: Dawid Kuroczko
Дата:
Сообщение: Re: What about utility to calculate planner cost constants?
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: What needs to be done for real Partitioning?