Re: BUG #15538: Postgres query performance is slow. - Mailing list pgsql-bugs

From Jim Finnerty
Subject Re: BUG #15538: Postgres query performance is slow.
Date
Msg-id 1544189501635-0.post@n3.nabble.com
Whole thread Raw
In response to BUG #15538: Postgres query performance is slow.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15541: Use after release in PQprint
Next
From: PG Bug reporting form
Date:
Subject: BUG #15542: value too long for type character varying does not showthe real parameter value