From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | otar shavadze <oshavadze(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists |
Date: | 2016-11-10 20:58:31 |
Message-ID: | 19051.1478811511@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> On Thu, Nov 10, 2016 at 7:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> If you are using that contrib module, and it's capturing this operator
>> reference, that would probably explain the bad estimate. You could
>> drop the extension if you're not depending on its other features, or you
>> could explicitly qualify the operator name ("operator(pg_catalog.@>)"),
>> or you could upgrade to 9.6 (don't forget to do ALTER EXTENSION ... UPDATE
>> afterwards).
> Isn't the operator determined at index build time? If he doesn't want to
> update to 9.6, I think he would need to rebuild the index, removing
> the "gin__int_ops" specification.
The operator in the query isn't. But yes, if he's using an index that's
built on the extension's opclass, he'd need to rebuild that too in order
to still use the index with the core @> operator.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Patrick B | 2016-11-11 00:44:09 | PLPGSQL returning number of rows |
Previous Message | Jeff Janes | 2016-11-10 20:20:36 | Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists |