Re: index only scan taking longer to run

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Ayub M <hiayub(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: index only scan taking longer to run
Date: 2021-04-29 19:52:33
Message-ID: CAHOFxGoROVhzYfD8_3ifkV8kNQVF9KgHR6qZJRQiH2QThSt98w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 often a bad code smell for me with
expecting the system to sort data and remove duplicates, when I should have
controlled my set through proper joins.

Also, when I see a join condition on the result of a subquery, I question
the data structure. re:
bravo_lima = ( SELECT max(bravo_lima) FROM five_lima foxtrot_four ...)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2021-04-29 22:23:40 Re: index only scan taking longer to run
Previous Message ERR ORR 2021-04-29 19:12:30 Re: Oracle vs. PostgreSQL - a comment