Alexandre de Arruda Paes <adaldeia(at)gmail(dot)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