Re: Indexes works only on miss - Mailing list pgsql-general

From Tom Lane
Subject Re: Indexes works only on miss
Date
Msg-id 23888.1136568386@sss.pgh.pa.us
Whole thread Raw
In response to Indexes works only on miss  (Sebastjan Trepca <trepca@gmail.com>)
List pgsql-general
Sebastjan Trepca <trepca@gmail.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

pgsql-general by date:

Previous
From: Trent Shipley
Date:
Subject: Relational Inheritance Thoughts
Next
From: "Bruno Almeida do Lago"
Date:
Subject: Strange behavior