I really don't understand this behaviour. I have a table with column "owner" on which I created an index with btree method. The table contains around 3k rows.
Now I run it using EXPLAIN command.
This query has some results:
explain SELECT "Name" FROM test WHERE "Owner"='root'
"Seq Scan on test (cost=0.00..119.11 rows=263 width=11)" " Filter: (("Owner")::text = 'root'::text)"
Query without results:
explain SELECT "Name" FROM test WHERE "Owner"='blah'
"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? Is it because of the memory? I'm running on default db settings, version 8.0 and SUSE 10.