Re: [GENERAL] Simple Query not using Primary Key Index - Mailing list pgsql-general

From Alban Hertroys
Subject Re: [GENERAL] Simple Query not using Primary Key Index
Date
Msg-id 0BA27597-9745-4482-889F-50EC5E300073@gmail.com
Whole thread Raw
In response to [GENERAL] Simple Query not using Primary Key Index  ("Podrigal, Aron" <aronp@guaranteedplus.com>)
Responses Re: [GENERAL] Simple Query not using Primary Key Index  (Aron Podrigal <aronp@guaranteedplus.com>)
List pgsql-general
> 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
doesnot 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
lookingat? 

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 by date:

Previous
From: "Podrigal, Aron"
Date:
Subject: [GENERAL] Simple Query not using Primary Key Index
Next
From: Aron Podrigal
Date:
Subject: Re: [GENERAL] Simple Query not using Primary Key Index