Re: Postgres chooses slow query plan from time to time
Kristjan Mustkivi <sonicmonkey@gmail.com>
From: Kristjan Mustkivi <sonicmonkey@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Janes <jeff.janes@gmail.com>,
Tomas Vondra <tomas.vondra@enterprisedb.com>, Pgsql Performance <pgsql-performance@lists.postgresql.org>
Date: 2021-09-15T13:01:50Z
Lists: pgsql-performance
On Wed, Sep 15, 2021 at 3:16 PM Tom Lane <tgl@sss.pgh.pa.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.mustkivi@gmail.com