Re: best practices with index on varchar column

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "Layet Benjamin" <benjamin(at)moonfactory(dot)co(dot)jp>, pgsql-performance(at)postgresql(dot)org
Subject: Re: best practices with index on varchar column
Date: 2005-03-22 10:49:36
Message-ID: op.sn1ccygeth1vuj@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Huxton 2005-03-22 11:56:24 Re: What about utility to calculate planner cost constants?
Previous Message Dawid Kuroczko 2005-03-22 09:58:43 Re: What about utility to calculate planner cost constants?