pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #15538: Postgres query performance is slow.
Date: Fri, 7 Dec 2018 06:31:41 -0700 (MST)
Message-ID: <1544189501635-0.post@n3.nabble.com> (raw)
In-Reply-To: <15538-cbf9af6df1621824@postgresql.org>
References: <15538-cbf9af6df1621824@postgresql.org>

I don't see evidence of a bug here (so far), but a couple of things are
worthy of mention:

-  The estimated number of rows is much higher than the actual.  A likely
cause of this under-estimation
   is that the columns are correlated.  If so, then the estimate may be
improved in PG10+ by collecting
   multi-column statistics on (id, time) or (id, time, isValid), but that
doesn't help you on PG9.6
-  For the historic partitions that are no longer being updated, you could
cluster the heap by the index,
   and possibly disable the bitmap heap scan.  If either or both of these
changes improve scan performance
   significantly on the 2017 data, consider partitioning by month and
clustering historic monthly partitions.



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html




view thread (2+ messages)

Message-ID: <1544189501635-0.post@n3.nabble.com>
Permalink:  ../1544189501635-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1544189501635-0.post@n3.nabble.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 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-bugs@postgresql.org
  Cc: jfinnert@amazon.com
  Subject: Re: BUG #15538: Postgres query performance is slow.
  In-Reply-To: <1544189501635-0.post@n3.nabble.com>
  References: <15538-cbf9af6df1621824@postgresql.org> <1544189501635-0.post@n3.nabble.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