Re: PG using index+filter instead only use index - Mailing list pgsql-performance

From Tom Lane
Subject Re: PG using index+filter instead only use index
Date
Msg-id 5135.1269028162@sss.pgh.pa.us
Whole thread Raw
In response to PG using index+filter instead only use index  (Alexandre de Arruda Paes <adaldeia@gmail.com>)
Responses Re: PG using index+filter instead only use index
List pgsql-performance
Alexandre de Arruda Paes <adaldeia@gmail.com> writes:
> My question: if the cost is exactly the same, why PG choose the index
> ict13t2 on ct13t and apply a filter instead use the primary key ?

Why shouldn't it, if the estimated costs are the same?  You didn't
actually demonstrate they're the same though.

The cost estimates look a bit unusual to me; are you using nondefault
cost parameters, and if so what are they?

            regards, tom lane

pgsql-performance by date:

Previous
From: Dave Crooke
Date:
Subject: Re: too complex query plan for not exists query and multicolumn indexes
Next
From: Yeb Havinga
Date:
Subject: Re: GiST index performance