On Mon, Sep 12, 2022 at 05:34:37PM +0100, Matheus Martin wrote:
> Understood. I have run a prepared statement with the query in question
> through `psql` and JIT was not used (see plan below), however please note
> that the long response times were never reproducible from `psql`, they only
> happen from our JDBC application.
Do you have pg_stat_statements enabled? If yes you could check what are the
maximum execution and planning time for that query, which may give an answer.