Re: Bug #474: Index using problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: joe78(at)freemail(dot)hu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #474: Index using problem
Date: 2001-10-05 13:48:50
Message-ID: 6987.1002289730@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> explain select * from cim where utod_cim_id=0;
> NOTICE: QUERY PLAN:
> Seq Scan on cim (cost=0.00..6555.41 rows=253633 width=118)

> The query optimizer does not use my index..

How many rows are there where utod_cim_id=0? The planner guesses that
there are a lot (253633, to be exact) and concludes that using the index
is not profitable for this query.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-10-05 13:52:20 Re: Bug #474: Index using problem
Previous Message Andreas Wernitznig 2001-10-05 09:04:45 Re: Bug #474: Index using problem