Re: Suboptimal plan when IN(...), ORDER BY and LIMIT are used (no JOINs)

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Dmitry Koterov <dmitry(dot)koterov(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Suboptimal plan when IN(...), ORDER BY and LIMIT are used (no JOINs)
Date: 2021-04-15 00:41:18
Message-ID: CAHOFxGo0mB+9WFBgFyZh3UzUkrpJ58cbx5t8W7D-qz6_YLc_Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your query and explain analyze output do not seem to match.

Filter: (cred_id = '1001344096118566254'::bigint)

I don't see anything like that in your query, nor an index that would
support accomplishing that without filtering after fetching the 184k rows
initially like the planner does.

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry Koterov 2021-04-15 03:43:59 Re: Suboptimal plan when IN(...), ORDER BY and LIMIT are used (no JOINs)
Previous Message Moris Rumenov Vrachovski 2021-04-14 23:10:46 Vulnerability PostgreSQL 11.2