Re: Postgres chooses slow query plan from time to time

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Kristjan Mustkivi <sonicmonkey(at)gmail(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres chooses slow query plan from time to time
Date: 2021-09-13 19:39:05
Message-ID: CAMkU=1yAuQ3N_jkwdxbcjH-j2-a-ZV34sAkdUyT4C=cNiAkOXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Sep 13, 2021 at 9:25 AM Kristjan Mustkivi <sonicmonkey(at)gmail(dot)com>
wrote:

>
> I have caught this with AUTOEXPLAIN:
>
> Index Cond: ((cage_code = $3) AND (cage_player_id = $2) AND
> (modified_time < $5))
> Filter: (((product_code)::text = ($1)::text) AND
> ((balance_type)::text = ($4)::text))
>
>
Is it always the case that autoexplain shows plans with $1 etc, rather than
real values, for the slow queries?

If so, then it could be that the switch from custom to generic plans is
causing the problem.

Cheers,

Jeff

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Dunstan 2021-09-13 20:36:34 Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Previous Message Jeff Janes 2021-09-13 19:21:39 Re: Postgres chooses slow query plan from time to time