Re: Simple IN vs IN values performace

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Oleksandr Voytsekhovskyy <av(at)uniweb(dot)ua>
Cc: "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-22 22:23:45
Message-ID: CAKFQuwZ1=FmE=8f9V6RFZ22WJoyZhsKx24aO7PfEPGeL_MpGpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-02-22 22:25:49 Re: Migrate database to different versions
Previous Message Alexander Farber 2021-02-22 20:53:14 Re: JSONB_AGG: aggregate function calls cannot be nested