why Sequencial Scan when selecting on primary key of table?

Поиск
Список
Период
Сортировка
От Brian Tarbox
Тема why Sequencial Scan when selecting on primary key of table?
Дата
Msg-id 004301c32791$f983c710$01000001@trouble
обсуждение исходный текст
Ответ на Re: Enabling and Disabling Sequencial Scan  ("Nikolaus Dilger" <nikolaus@dilger.cc>)
Ответы Re: why Sequencial Scan when selecting on primary key of table?  (Andrew Sullivan <andrew@libertyrms.info>)
Re: why Sequencial Scan when selecting on primary key of table?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
I have a simple table with a dozen integer fields and a primary key.

When I say "explain select * from Patient where Patient_primary_key = 100"

I get sequential scan.

I've just converted my application from MySQL and am seeing everything run
about 3X slower.  What do I have to do to get postgres to use indexes?

Brian Tarbox


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

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