Re: why Sequencial Scan when selecting on primary key of table?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why Sequencial Scan when selecting on primary key of table?
Дата
Msg-id 21289.1054403701@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: why Sequencial Scan when selecting on primary key of table?  ("Brian Tarbox" <btarbox@theworld.com>)
Список pgsql-performance
"Brian Tarbox" <btarbox@theworld.com> writes:
> The primary key field is an integer and I have performed vacuum analyse but
> that does not seem to change anything.

Hm.  So how big is the table, exactly?  On small tables a seqscan will
be preferred because the extra I/O to examine the index costs more than
the CPU to examine all the tuples on a disk page.

> I've also heard that postgres will not indexes when JOINing tables.  Can
> that really be true??

We have some join methods that like indexes and we have some that find
no benefit in 'em.  Again, testing on toy-size tables is not a good
guide to what will happen on larger tables.

            regards, tom lane

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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: why Sequencial Scan when selecting on primary key of table?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: why Sequencial Scan when selecting on primary key of table?