From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Michael Lewis <mlewis@entrata.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tim Kane <tim.kane@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-general@postgresql.org>
Subject: Re: Avoiding out of date statistics / planner
Date: Wed, 12 Feb 2020 21:32:45 +0100
Message-ID: <20200212203245.yuilq66zbxu3iv7d@development> (raw)
In-Reply-To: <CAHOFxGoLmmZCkP=zMpV7mTJk5Rqhprtw=rQkj6-bWK5ZwQMLUw@mail.gmail.com>
References: <CADVWZZ+Nwc1v6pksbgEYmY8H+hOGY70y3LUEVAC8MHTvJ9Le6w@mail.gmail.com>
<23751.1581520559@sss.pgh.pa.us>
<CAHOFxGoLmmZCkP=zMpV7mTJk5Rqhprtw=rQkj6-bWK5ZwQMLUw@mail.gmail.com>
On Wed, Feb 12, 2020 at 10:23:22AM -0700, Michael Lewis wrote:
>It may also be worth noting that it is possible to make autovacuum/analyze
>more aggressive, perhaps only on the tables that see large changes in data
>that might result in a statistics issue. If you could share a query,
>explain analyze output, and pseudo code or at least description of what
>sort of bulk operations are being done, then more insight could be offered.
Another thing you can do is deploy auto_explain, and log explain plan
for long-runnning queries. That won't fix the root cause, but it will
help you with confirming the root cause - you'll see the query plan,
which should give you enough context.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, mlewis@entrata.com, tgl@sss.pgh.pa.us, tim.kane@gmail.com
Subject: Re: Avoiding out of date statistics / planner
In-Reply-To: <20200212203245.yuilq66zbxu3iv7d@development>
References: <CADVWZZ+Nwc1v6pksbgEYmY8H+hOGY70y3LUEVAC8MHTvJ9Le6w@mail.gmail.com> <23751.1581520559@sss.pgh.pa.us> <CAHOFxGoLmmZCkP=zMpV7mTJk5Rqhprtw=rQkj6-bWK5ZwQMLUw@mail.gmail.com> <20200212203245.yuilq66zbxu3iv7d@development>
* 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