Re: best practices with index on varchar column - Mailing list pgsql-performance

From PFC
Subject Re: best practices with index on varchar column
Date
Msg-id op.sn1ccygeth1vuj@localhost
Whole thread Raw
In response to best practices with index on varchar column  ("Layet Benjamin" <benjamin@moonfactory.co.jp>)
Responses Re: best practices with index on varchar column
Re: best practices with index on varchar column
List 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 by date:

Previous
From: Dawid Kuroczko
Date:
Subject: Re: What about utility to calculate planner cost constants?
Next
From: Hannu Krosing
Date:
Subject: Re: What needs to be done for real Partitioning?