Am 05.03.19 um 17:51 schrieb Vijaykumar Jain:
> Thanks Tom.
>
>
> I mean if the instance is a test instance,
> probably analysis_name_date_key can be dropped and the query can be
> run again so as to check if it still returns the correct rows.
> or create an index in parallel with the same col as
> analysis_name_date_key and check if the optimizer choses the right
> index.
> and then come to conclusion of bad index.
>
> Also is there an option where we can force a particular index to be used ?
>
no, but you can set enable_indexscan to off and maybe also
enable_bitmapscan to off to force the planner to choose a seq-scan.
I'm sure in this case you will get a correct result.
the other thing is, it would be nice to to know why the index is corrupt.
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com