Search Postgresql Archives

Indexes works only on miss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.

Thanks for help, Sebastjan



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux