From: Oleksandr Voytsekhovskyy <young.inbox@gmail.com>
To: Michael Lewis <mlewis@entrata.com>
Cc: Ron <ronljohnsonjr@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Simple IN vs IN values performace
Date: Tue, 23 Feb 2021 11:30:56 +0200
Message-ID: <A5F5CB0B-DE62-49A2-BD5D-E39F26C34F87@gmail.com> (raw)
In-Reply-To: <CAHOFxGqNBsD6vktSw3ZB2CXDTY5N-YxmkwSmCjwxXOAANOKbdg@mail.gmail.com>
References: <F39A0ECE-1FB0-41BA-9429-3C617C51E6A6@uniweb.ua>
<7334ed05-d880-d6c5-46ed-24f6b6491a2a@gmail.com>
<CAHOFxGqNBsD6vktSw3ZB2CXDTY5N-YxmkwSmCjwxXOAANOKbdg@mail.gmail.com>
Greetings,
Didn’t get your ideas with materialized CTE or a subquery with OFFSET 0
Could you please show simple example?
> 23 февр. 2021 г., в 04:33, Michael Lewis <mlewis@entrata.com> написал(а):
>
> Insert the values into a TEMPORARY TABLE, then join that to your main table?
>
> In my experience, this is very performant but needs an analyze command after populating the temp table to ensure there are statistics so the plan doesn't go awry. Otherwise, I'm not sure it is different from a materialized CTE or a subquery with OFFSET 0 at the end.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: young.inbox@gmail.com, mlewis@entrata.com, ronljohnsonjr@gmail.com
Subject: Re: Simple IN vs IN values performace
In-Reply-To: <A5F5CB0B-DE62-49A2-BD5D-E39F26C34F87@gmail.com>
References: <F39A0ECE-1FB0-41BA-9429-3C617C51E6A6@uniweb.ua> <7334ed05-d880-d6c5-46ed-24f6b6491a2a@gmail.com> <CAHOFxGqNBsD6vktSw3ZB2CXDTY5N-YxmkwSmCjwxXOAANOKbdg@mail.gmail.com> <A5F5CB0B-DE62-49A2-BD5D-E39F26C34F87@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox