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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Simple Query not using Primary Key Index
Дата
Msg-id CAKFQuwaAn6N1G45A0eHoFrkuhA-Aq8RFiEY0HMzDm0asV7U5tA@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Simple Query not using Primary Key Index  ("Podrigal, Aron" <aronp@guaranteedplus.com>)
Список pgsql-general
On Mon, Feb 6, 2017 at 4:16 PM, 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?


​Can you prove that "mytable.id" is of type "uuid" and not "text"?

As asked, how big is mytable?

These are readily answered if you show the explain analyze results.

David J.​

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

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