From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
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: Sat, 25 Apr 2020 08:02:46 -0400
Message-ID: <20200425120246.GP13712@tamriel.snowman.net> (raw)
In-Reply-To: <13457.1587757192@sss.pgh.pa.us>
References: <35dc90d6-e0c2-13b8-3184-e3db5d854a78@gmail.com>
<CAMkU=1w0kSDvBO=KrRSxk8_oFc5cSR+O1J5zkp4+Ci4RF0_+Pw@mail.gmail.com>
<20200424183323.GO13712@tamriel.snowman.net>
<13457.1587757192@sss.pgh.pa.us>
Greetings,
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> 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.
Once burned, twice shy, I suppose- considering we weren't given the
actual DDL the first round, I'm guessing there's other differences.
> I'm also wondering exactly which Postgres version this is.
Also a good question.
Thanks,
Stephen
Attachments:
[application/pgp-signature] signature.asc (818B, ../20200425120246.GP13712@tamriel.snowman.net/2-signature.asc)
download
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: sfrost@snowman.net, tgl@sss.pgh.pa.us, 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: <20200425120246.GP13712@tamriel.snowman.net>
* 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