Re: Query choosing Bad Index Path (ASC/DESC ordering).

2022-02-08 Thread Mind Body Nature
It seems an issue of data distribution. More likely when traversing without orderby [default ascending order] matching rows were found quickly. You can validate the same by using order by 14 asc, 2 asc limit 10. You can try creating an index on auditlogid desc, auditedtime desc. OR any other combi

Query chooses Bad Index Path

2022-02-08 Thread Valli Annamalai
Postgres version: 11.4 Problem: Query choosing Bad Index Path. Details are provided below Table : \d public.distdbentityauditlog1_46625_temp_mahi1; Table "public.distdbentityauditlog1_46625_temp_mahi1" Column |Type | Collation | Nullable | Defa