pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: tiaswin@gmx.de
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Query is sometimes fast and sometimes slow: what could be the reason?
Date: Wed, 14 Sep 2022 10:59:53 -0500
Message-ID: <20220914155953.GY31833@telsasoft.com> (raw)
In-Reply-To: <trinity-e7635062-7f0a-42dc-985c-6af74dfa1787-1663167727005@3c-app-gmx-bs70>
References: <trinity-e7635062-7f0a-42dc-985c-6af74dfa1787-1663167727005@3c-app-gmx-bs70>

On Wed, Sep 14, 2022 at 05:02:07PM +0200, tiaswin@gmx.de wrote:
> <html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>What could be the reason of a query, which is sometimes fast and sometimes slow (factor &gt;10x)?</div>
> <div>(running on a large table).</div>
> <div>&nbsp;</div>
> <div>&nbsp;</div></div></body></html>

Lots of possible issues.  Is it using a different query plan ?
Collect a good plan and a bad one and compare, or send both.
Perhaps use autoexplain to do so.

Turn on logging and send as much information as you can as described
here.
https://wiki.postgresql.org/wiki/Slow_Query_Questions

Please try to configure your mail client to send text mail (instead of
or in addition to the html one).

-- 
Justin





view thread (2+ messages)

Message-ID: <20220914155953.GY31833@telsasoft.com>
Permalink:  ../20220914155953.GY31833@telsasoft.com/
Also on:    postgresql.org/message-id/20220914155953.GY31833@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, tiaswin@gmx.de, pgsql-performance@lists.postgresql.org
  Subject: Re: Query is sometimes fast and sometimes slow: what could be the reason?
  In-Reply-To: <20220914155953.GY31833@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox