Re: PostgreSQL does not choose my indexes well - Mailing list pgsql-performance

From Tom Lane
Subject Re: PostgreSQL does not choose my indexes well
Date
Msg-id 13457.1587757192@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL does not choose my indexes well  (Stephen Frost <sfrost@snowman.net>)
Responses Re: PostgreSQL does not choose my indexes well
List pgsql-performance
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



pgsql-performance by date:

Previous
From: Stephen Frost
Date:
Subject: Re: PostgreSQL does not choose my indexes well
Next
From: Moises Lopez
Date:
Subject: The query plan get all columns but I'm using only one column.