From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Arcadio Ortega Reinoso <arcadio.ortega@gmail.com>
Cc: Pgsql Performance <pgsql-performance@lists.postgresql.org>
Subject: Re: PostgreSQL does not choose my indexes well
Date: Fri, 24 Apr 2020 15:39:52 -0400
Message-ID: <13457.1587757192@sss.pgh.pa.us> (raw)
In-Reply-To: <20200424183323.GO13712@tamriel.snowman.net>
References: <35dc90d6-e0c2-13b8-3184-e3db5d854a78@gmail.com>
<CAMkU=1w0kSDvBO=KrRSxk8_oFc5cSR+O1J5zkp4+Ci4RF0_+Pw@mail.gmail.com>
<20200424183323.GO13712@tamriel.snowman.net>
Stephen Frost <sfrost@snowman.net> writes:
> Turns out to be because what was provided wasn't actually what was being
> used- there's a domain in there and that seems to gum up the works and
> make it so we don't consider the partial index as being something we can
> use (see the discussion at the end of the other sub-thread).
Some simple experiments here don't find that a domain-type column prevents
use of the partial index. So it's still not entirely clear what's
happening for the OP. I concur with Jeff's suggestion to try forcing
use of the desired index, and see whether it happens at all and what
the cost estimate is.
I'm also wondering exactly which Postgres version this is.
regards, tom lane
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: tgl@sss.pgh.pa.us, sfrost@snowman.net, jeff.janes@gmail.com, arcadio.ortega@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: PostgreSQL does not choose my indexes well
In-Reply-To: <13457.1587757192@sss.pgh.pa.us>
* 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