pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Marco Colli <collimarco91@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Bad query plan when you add many OR conditions
Date: Mon, 13 Jan 2020 23:14:11 +0100
Message-ID: <20200113221411.sm5dm6fol3uwbuyp@development> (raw)
In-Reply-To: <CAFvCgN55e_USxidsShLX7_Eu-t8n31LL6LdsodxvX1WpHuLbag@mail.gmail.com>
References: <CAFvCgN5N+C1BZdri5t2gnP15UFNBGtg6Ve0nJ7WALr4XwWYorg@mail.gmail.com>
	<20200110030601.GH12066@telsasoft.com>
	<CAFvCgN55e_USxidsShLX7_Eu-t8n31LL6LdsodxvX1WpHuLbag@mail.gmail.com>

On Fri, Jan 10, 2020 at 02:30:27PM +0100, Marco Colli wrote:
>@Justin Pryzby I have tried this as you suggested:
>
>CREATE STATISTICS statistics_on_subscriptions_project_id_and_tags ON
>project_id, tags FROM subscriptions;
>VACUUM ANALYZE subscriptions;
>
>Unfortunately nothing changes and Postgresql continues to use the wrong
>plan (maybe stats don't work well on array fields like tags??).
>

We support this type of clause for extended statistics (yet).


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 





view thread (11+ messages)  latest in thread

Message-ID: <20200113221411.sm5dm6fol3uwbuyp@development>
Permalink:  ../20200113221411.sm5dm6fol3uwbuyp@development/
Also on:    postgresql.org/message-id/20200113221411.sm5dm6fol3uwbuyp@development

 · 

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: tomas.vondra@2ndquadrant.com, collimarco91@gmail.com, pryzby@telsasoft.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Bad query plan when you add many OR conditions
  In-Reply-To: <20200113221411.sm5dm6fol3uwbuyp@development>

* 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