Indexes works only on miss

Поиск
Список
Период
Сортировка
От Sebastjan Trepca
Тема Indexes works only on miss
Дата
Msg-id cd329af80601060842h436fbf44q58ed99458053baf@mail.gmail.com
обсуждение исходный текст
Ответы Re: Indexes works only on miss  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Indexes works only on miss  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Florent Garcin
Дата:
Сообщение: constraint on type object in oracle
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Autocommit in Fedora 3