pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: benoit <benoit@hopsandfork.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: RE: Forced to use UNION ALL when having multiple ANY operators and ORDER BY LIMIT
Date: Mon, 12 Jun 2023 20:50:50 +0000
Message-ID: <6551f5840dc44882bdac1475526ebfc9@hopsandfork.com> (raw)
In-Reply-To: <CAH2-Wzm7Hq69evXDC2Q3BU+HWm-s9w7qdBpXuNK8PraRweSkpA@mail.gmail.com>
References: <7e0c07696f3f42189815f28c898c3133@hopsandfork.com>
	<CAH2-Wzm7Hq69evXDC2Q3BU+HWm-s9w7qdBpXuNK8PraRweSkpA@mail.gmail.com>

Sadly it doesn't help to disable indexscan. The plan : https://explain.dalibo.com/plan/3b3gfce5b29c3hh4

________________________________
De : Peter Geoghegan <pg@bowt.ie>
Envoyé : lundi 12 juin 2023 22:34:50
À : benoit
Cc : pgsql-performance@lists.postgresql.org
Objet : Re: Forced to use UNION ALL when having multiple ANY operators and ORDER BY LIMIT

On Mon, Jun 12, 2023 at 1:17 PM benoit <benoit@hopsandfork.com> wrote:
> Is there a misusage of my indexes?
>
> Is there a limitation when using ANY or IN operators and ordered LIMIT behind?

It's complicated. Do you find that you get satisfactory performance if
you force a bitmap index scan? In other words, what is the effect of
"set enable_indexscan = off" on your original query? Does that speed
up execution at all? (I think that this approach ought to produce a
plan that uses a bitmap index scan in place of the index scan, without
changing anything else.)

--
Peter Geoghegan


view thread (8+ messages)  latest in thread

Message-ID: <6551f5840dc44882bdac1475526ebfc9@hopsandfork.com>
Permalink:  ../6551f5840dc44882bdac1475526ebfc9@hopsandfork.com/
Also on:    postgresql.org/message-id/6551f5840dc44882bdac1475526ebfc9@hopsandfork.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: benoit@hopsandfork.com, pg@bowt.ie, pgsql-performance@lists.postgresql.org
  Subject: RE: Forced to use UNION ALL when having multiple ANY operators and ORDER BY LIMIT
  In-Reply-To: <6551f5840dc44882bdac1475526ebfc9@hopsandfork.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