what is the cause that scan type is showing as 'seq scan' after indexing

Поиск
Список
Период
Сортировка
От shreedhar
Тема what is the cause that scan type is showing as 'seq scan' after indexing
Дата
Msg-id 002701c2c53b$176df660$1201a8c0@a4005
обсуждение исходный текст
Ответы Re: what is the cause that scan type is showing as 'seq scan' after indexing  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-admin
Hi All,

Before indexing query plan was showing cost as 40.00, after indexing query
plan again showing as 'seq scan' and cost as 3060.55.
The field which i indexed is primary key to this table.
May i know
1) what is the cause that scan type is showing as 'seq scan' after indexing
also
2) why it is showing cost as high value compare to previous.


pmnport2=# explain select * from tblpermissions where accountid in
(296,290,292
,293) and raccountid not in (296,290,292,293);
NOTICE:  QUERY PLAN:

Seq Scan on tblpermissions  (cost=0.00..40.00 rows=19 width=8)

EXPLAIN
pmnport2=# create index tblpermissions_accountid_idx on tblpermissions
(account
id);
CREATE
pmnport2=# explain select * from tblpermissions where accountid in
(296,290,292
,293) and raccountid not in (296,290,292,293);
NOTICE:  QUERY PLAN:

Seq Scan on tblpermissions  (cost=0.00..3060.55 rows=1459 width=8)

EXPLAIN
pmnport2=#

With Best Regards,
Sreedhar.


"Faith, faith, faith in ourselves, faith, faith in God, this is the secret
of greatness.
If you have faith in all the three hundred and thirty millions of your
mythological gods,
and in all the gods which foreigners have now and again introduced into your
midst,
and still have no faith in yourselves, there is no salvation for you. "
(III. 190)


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

Предыдущее
От: Mauri Sahlberg
Дата:
Сообщение: Re: Registering all User Operations
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: what is the cause that scan type is showing as 'seq scan' after indexing