Re: Indexes works only on miss

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sebastjan Trepca <trepca(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Indexes works only on miss
Date: 2006-01-06 17:26:26
Message-ID: 23888.1136568386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sebastjan Trepca <trepca(at)gmail(dot)com> writes:
> "Seq Scan on test (cost=0.00..119.11 rows=263 width=11)"
> " Filter: (("Owner")::text = 'root'::text)"

> "Index Scan using idx_test_owner on test (cost=0.00..96.56 rows=28
> width=11)"
> " Index Cond: (("Owner")::text = 'blah'::text)"

> Why is this happening?

This is the planner doing what it is supposed to do, ie, decide whether
the index is selective enough to be worth using.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Almeida do Lago 2006-01-06 17:26:27 Strange behavior
Previous Message Trent Shipley 2006-01-06 17:23:36 Relational Inheritance Thoughts