Re: PG using index+filter instead only use index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexandre de Arruda Paes <adaldeia(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PG using index+filter instead only use index
Date: 2010-03-19 19:49:22
Message-ID: 5135.1269028162@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Yeb Havinga 2010-03-19 20:20:49 Re: GiST index performance
Previous Message Dave Crooke 2010-03-19 19:12:49 Re: too complex query plan for not exists query and multicolumn indexes