Skip site navigation (1) Skip section navigation (2)

Re: Problem with LIKE-Performance

From: Guido Neitzer <guido(dot)neitzer(at)pharmaline(dot)de>
To: "Tarabas (Manuel Rorarius)" <tarabas(at)tarabas(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Problem with LIKE-Performance
Date: 2006-04-18 15:43:51
Message-ID: F2B21A42-871E-4C1A-9631-1076FE642B97@pharmaline.de (view raw or flat)
Thread:
Lists: pgsql-performance
On 18.04.2006, at 17:16 Uhr, Tarabas (Manuel Rorarius) wrote:

> Is there any way to speed the like's up with a different locale than C
> or to get an order by in a different Locale although using the
> default C locale?

Sure. Just create the index with

create index <tabname>_<column>_index on <tabname> (<column>  
varchar_pattern_ops);

Than you can use something like

select * from <table> where <column> like 'Something%';

Remember that an index can't be used for queries with '%pattern%'.

cug

In response to

pgsql-performance by date

Next:From: Tarabas (Manuel Rorarius)Date: 2006-04-18 15:43:53
Subject: Re: [bulk] RE: Problem with LIKE-Performance
Previous:From: Hakan KocamanDate: 2006-04-18 15:35:30
Subject: Re: Problem with LIKE-Performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group