Re: Index on VARCHAR with text_pattern_ops inside PL/PGSQL procedure.

From: Piotr Gasidło <quaker(at)barbara(dot)eu(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Index on VARCHAR with text_pattern_ops inside PL/PGSQL procedure.
Date: 2007-12-13 11:41:40
Message-ID: a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2007/12/10, Piotr Gasidło <quaker(at)barbara(dot)eu(dot)org>:
> Why PL/PGSQL is unable to proper utilize
> users_user_name_unique_text_pattern_ops?

I found solution, that satisfies me (EXECUTE is a bit ugly for me).

I've replaced LIKE operator with ~=~ operator. Now PL/PGSQL function
properly uses index on SELECT.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2007-12-13 15:46:17 Heavy write activity on first vacuum of fresh TOAST data
Previous Message Joshua D. Drake 2007-12-12 15:47:00 Re: Limited performance on multi core server