Re: Functional Index

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Alexander Presber <aljoscha(at)weisshuhn(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Functional Index
Date: 2006-11-22 16:18:57
Message-ID: 20061122081255.I98661@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 22 Nov 2006, Alexander Presber wrote:

> Hello everybody,
>
> I am trying to speed up a query on an integer column by defining an
> index as follows
>
> > CREATE INDEX idx_main_subject ON pdb.main (lower(main_subject::text)
> using varchar_ops);
>
> on column "main_subject".
>
> I had hoped to get speedups for right-fuzzy LIKE-searches,

IIRC, unless you're in C locale, you'll want varchar_pattern_ops rather
than varchar_ops on the index to make it considered for a LIKE search.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-11-22 16:23:13 Re: MSSQL to PostgreSQL : Encoding problem
Previous Message Joshua D. Drake 2006-11-22 16:15:33 Re: PGSQL Newbie