Re: Simple IN vs IN values performace

From: Alexander Voytsekhovskyy <young(dot)inbox(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Oleksandr Voytsekhovskyy <av(at)uniweb(dot)ua>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Simple IN vs IN values performace
Date: 2021-02-23 11:54:19
Message-ID: CAPa4P2a0dMkOcMdyKK2oi406OdZubp-fc5-nc3iBvw55EktAzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

i have tested both options ANY with string + parsing and simple array - and
there are cases when execution time 100+ times worse than IN

On Tue, Feb 23, 2021 at 12:23 AM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Monday, February 22, 2021, Oleksandr Voytsekhovskyy <av(at)uniweb(dot)ua>
> wrote:
>
>> What is the right way to pass long INT values list to IN filter
>>
>
> Don’t.
>
> Pass in a delimited string, then parse that string into an array and use
> “= any(array)”.
>
> This has the primary benefit of making the input a single parameter.
>
> David J.
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2021-02-23 13:48:15 Re: cannot promote after recovery for PITR
Previous Message Pavel Stehule 2021-02-23 11:39:49 Re: Simple IN vs IN values performace