From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Diogo de Oliveira Biazus <diogo(at)ikono(dot)com(dot)br> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with functional indexes |
Date: | 2003-02-21 19:57:36 |
Message-ID: | 20030221195736.GA2920@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Feb 21, 2003 at 16:04:52 -0300,
Diogo de Oliveira Biazus <diogo(at)ikono(dot)com(dot)br> wrote:
> Hi everybody,
> I'm having a problem with functional indexes.
>
> When I compare the function index using the "=" operator, it uses the index;
> Otherwise, if I use the "<>" operator it uses SeqScan...even when i set
> enable_seqscan to off.
>
> Ex.:
> SELECT * FROM MyTable WHERE myFunction(myField) = 'just testing';
> -> Works just fine.
> SELECT * FROM MyTable WHERE myFunction(myField) <> 'just testing';
> -> All I get is SeqScan...
I don't believe <> functions are generally going to be able to use indexes.
However, you really don't want to. The figure I have seen on these lists
is that if you are going to hit over 10% of the records a sequencial
scan is probably going to be faster.
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Tkach | 2003-02-21 20:03:50 | Re: A problem with sequences... |
Previous Message | Arguile | 2003-02-21 19:45:51 | Re: Best PostgreSQL Tuning Reference |