Index scan

Поиск
Список
Период
Сортировка
От Najm Hashmi
Тема Index scan
Дата
Msg-id 3A7996AC.AD99A45B@mondo-live.com
обсуждение исходный текст
Список pgsql-sql
Hi all,I  am unable to understand why  my inidcies are not  used in the query.
I have following indices:
index on categories.root
index on media.category
unique index on categories.idHere is my query :
mondo=# explain select m.id                  form media m, categories c                   where c.id=m.category and
c.rootlike 'B%';
 
NOTICE:  QUERY PLAN:

Hash Join  (cost=22.55..116.80 rows=11 width=28) ->  Seq Scan on media m  (cost=0.00..60.40 rows=840 width=16) ->  Hash
(cost=22.50..22.50 rows=20 width=12)       ->  Index Scan using cat_id_root on categories c
 
(cost=0.00..22.50 rows=20 width=12)
EXPLAIN
I simply dont understand why it uses seq scan on media.
Thanks all for your help.
-Najm



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

Предыдущее
От: mig@utdt.edu
Дата:
Сообщение: Re: RE: Rownum/ row Id
Следующее
От: "Albert REINER"
Дата:
Сообщение: 7.0.2-docs: textpos -> strpos