Re: [GENERAL] Simple Query not using Primary Key Index

Поиск
Список
Период
Сортировка
От Aron Podrigal
Тема Re: [GENERAL] Simple Query not using Primary Key Index
Дата
Msg-id CANJp-yjk1xLdZrT58=TPBsmfdT9jumaxdRF0wYhcx-xm8BUBzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Simple Query not using Primary Key Index  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: [GENERAL] Simple Query not using Primary Key Index
Список pgsql-general

EXPLAIN ANALYZE does not tell me much. It doesn't say why the planner opts for not using the Primary key index.

On Mon, Feb 6, 2017, 6:23 PM Alban Hertroys <haramrae@gmail.com> wrote:

> On 7 Feb 2017, at 0:16, Podrigal, Aron <aronp@guaranteedplus.com> wrote:
>
> Hi,
>
> I noticed when I do a simple SELECT id FROM mytable WHERE id = 'cb81d070-4213-465f-b32e-b8db43b83a25'::UUID  Postgres does not use the primary key index and opts for a Seq Scan.
>
> I of course did VACUUM ANALYZE and I have reset statistics But no sign. Is there any particular thing I should be looking at?

An EXPLAIN ANALYZE would be a good start.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: [GENERAL] Simple Query not using Primary Key Index
Следующее
От: Aron Podrigal
Дата:
Сообщение: Re: [GENERAL] Simple Query not using Primary Key Index