Re: Postgres chooses slow query plan from time to time

From: Kristjan Mustkivi <sonicmonkey(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres chooses slow query plan from time to time
Date: 2021-09-15 13:01:50
Message-ID: CAOQPKatWM8fTZXfgdseeG9wFvAnXvBg2nQN0zkCRLRCf+Yg5qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Sep 15, 2021 at 3:16 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Note the lack of any visible cast on the varchar column, in each one of
> these queries, even where I tried to force one to appear. There is
> something happening in your database that is not happening in mine.
>
> My mind is now running to the possibility that you've got some extension
> that creates an "=" operator that is capturing the syntax.
>
> regards, tom lane

The following extensions have been installed:

─[ RECORD 1 ]──────────────────────────────────────────────────────────
Name │ btree_gist
Version │ 1.5
Schema │ public
Description │ support for indexing common datatypes in GiST
─[ RECORD 2 ]──────────────────────────────────────────────────────────
Name │ pg_stat_statements
Version │ 1.6
Schema │ public
Description │ track execution statistics of all SQL statements executed
─[ RECORD 3 ]──────────────────────────────────────────────────────────
Name │ pgcrypto
Version │ 1.3
Schema │ public
Description │ cryptographic functions
─[ RECORD 4 ]──────────────────────────────────────────────────────────
Name │ plpgsql
Version │ 1.0
Schema │ pg_catalog
Description │ PL/pgSQL procedural language

Plus the some libraries preloaded: shared_preload_libraries =
'pg_stat_statements,pg_cron,auto_explain'

Thank you so much for looking into this!

Best regards,
--
Kristjan Mustkivi

Email: kristjan(dot)mustkivi(at)gmail(dot)com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2021-09-15 14:34:37 Re: Postgres chooses slow query plan from time to time
Previous Message Tom Lane 2021-09-15 12:16:52 Re: Postgres chooses slow query plan from time to time