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

2017-02-06 Thread Aron Podrigal
ron Podrigal wrote: > > In general, I do not understand why a PK index should not be used when > the > > query can be satisfied by the index itself. Can anyone give some reason > to > > this? > > > > On Mon, Feb 6, 2017, 6:29 PM Aron Podrigal > > wrote: &

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

2017-02-06 Thread Aron Podrigal
After resetting all statistics it still opts for a Seq Scan. I went ahead to test with creating another table and querying that, and it shows on that test table to be using the index. So I wonder if there is anything else that may effect the planner. is there a way I can dog into this and see the s

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

2017-02-06 Thread Aron Podrigal
In general, I do not understand why a PK index should not be used when the query can be satisfied by the index itself. Can anyone give some reason to this? On Mon, Feb 6, 2017, 6:29 PM Aron Podrigal wrote: > EXPLAIN ANALYZE does not tell me much. It doesn't say why the planner opts &

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

2017-02-06 Thread Aron Podrigal
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 wrote: > > > On 7 Feb 2017, at 0:16, Podrigal, Aron wrote: > > > > Hi, > > > > I noticed when I do a simple SELECT id FROM mytable WHERE id