Re: Highly Variable Planning Times

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Malis <michaelmalis2(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Highly Variable Planning Times
Date: 2017-04-19 23:48:40
Message-ID: 20170419234840.qubw2fdaeijoc4cu@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-04-19 16:43:07 -0700, Michael Malis wrote:
> > The profile seems to confirm that this is largely due to cache misses.
>
> Can you elaborate? Cache misses of what? Why is the planning time so
> variable?

Postgres uses caches for a lot of metadata of tables, indexes, ... Some
actions, like vacuum, DDL, table size changes trigger cache
invalidations for other backends so the caches stay coherent. What
you're likely seeing is that the cached cases are quick enough, and that
the slow plan cycles are when the cache has been invalidated.

- Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-04-19 23:52:41 Re: Unportable implementation of background worker start
Previous Message Michael Malis 2017-04-19 23:43:07 Re: Highly Variable Planning Times