On Thu, 29 Apr 2021 at 21:02, Ayub M wrote:
>
> In the below execution plan, the index scan on five_lima (table has 900m
> records) is where it's spending most of its time. I want to bring down the
> runtime to a few seconds, how do I optimize it? Tried forcing seq scan and
> ran vacuum/analyze
Without knowledge of the structure of your data, or even real table/field
names to be able to read the query with some sense of what the tables might
be like, offering advice is rather difficult. I didn't notice any nodes
with huge estimation problems at least.
I will suggest that DISTINCT is ofte