Re: Selectivity estimation for intarray with @@

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Uriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Selectivity estimation for intarray with @@
Date: 2015-07-21 18:01:54
Message-ID: 55AE8912.3050809@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/21/2015 07:28 PM, Alexander Korotkov wrote:
> On Tue, Jul 21, 2015 at 6:49 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> In this version of patch it's not checked if variable is actually and int[]
> not query_int. See following test case.
>
> # create table test2 as (select '1'::query_int val from
> generate_series(1,1000000));
> # analyze test2;
>
> # explain select * from test2 where '{1}'::int[] @@ val;
> ERROR: unrecognized int query item type: 0
>
> I've added this check.
>
> * Also use the estimators for the obsolete @ and ~ operators. Not that I
>> care much about those as they are obsolete, but seems strange not to, as
>> it's a trivial matter of setting the right estimator function.
>>
>> * I added an ANALYZE in the regression test. It still won't systematically
>> test all the cost estimation code, and there's nothing to check that the
>> estimates make sense, but at least more of the code will now run.
>
> You also forgot to include intarray--1.0--1.1.sql into patch. I've also
> added it.

Thanks, committed!

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-07-21 18:06:33 Re: [PROPOSAL] VACUUM Progress Checker.
Previous Message Paul Ramsey 2015-07-21 17:52:01 Re: [PATCH] postgres_fdw extension support