EXPLAIN ANALYZE not considering primary and unique indices!

Поиск
Список
Период
Сортировка
От Sanjay
Тема EXPLAIN ANALYZE not considering primary and unique indices!
Дата
Msg-id 1188217308.576102.165830@e9g2000prf.googlegroups.com
обсуждение исходный текст
Ответы Re: EXPLAIN ANALYZE not considering primary and unique indices!
Re: EXPLAIN ANALYZE not considering primary and unique indices!
Список pgsql-general
Hi All,

Say I have a simple table WEBSITE(website_id int4 PRIMARY KEY, name
VARCHAR(30)). While I try this:

EXPLAIN ANALYZE SELECT * FROM WEBSITE WHERE website_id = 1

the output is:
--------------------------------------------------------------------------------------
Seq Scan on website  (cost=0.00..1.31 rows=1 width=162) (actual
time=0.047..0.051 rows=1 loops=1)
  Filter: (website_id = 1)
Total runtime: 0.102 ms
---------------------------------------------------------------------------------------
Wondering why it is not using the index, which would have been
automatically created for the primary key.

Needing help.

thanks
Sanjay


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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Removing pollution from log files
Следующее
От: "Andrus"
Дата:
Сообщение: Re: simple query runs 26 seconds