From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Cresswell <pgsql-performance@stephen-cresswell.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Why is the optimiser choosing a sub-optimal plan?
Date: Mon, 14 Nov 2016 14:37:21 -0500
Message-ID: <20825.1479152241@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEywW=zTiZeCgcogXmBX1ufo0Y2+mz+JhC9tW=gwSN2CjFu4bw@mail.gmail.com>
References: <CAEywW=zTiZeCgcogXmBX1ufo0Y2+mz+JhC9tW=gwSN2CjFu4bw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Stephen Cresswell <pgsql-performance@stephen-cresswell.net> writes:
> I have the a table with two indexes...
(1) Tell us about the other table, mobile_summary_type.
(2) Did you transcribe the second query plan correctly? I have a hard
time believing that EXPLAIN printed two Index Cond lines for the same
indexscan.
(3) What PG version is this, exactly?
(4) Are you doing anything funny like disabling autovacuum/autoanalyze?
The rowcount estimates in the "good" plan seem rather far away from
reality, and it's not obvious why, particularly here:
> -> Seq Scan on mobile_summary_type mst
> (cost=0.00..18.80 rows=880 width=64) (actual time=0.014..0.016 rows=4
> loops=1)
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: tgl@sss.pgh.pa.us, pgsql-performance@stephen-cresswell.net
Subject: Re: Why is the optimiser choosing a sub-optimal plan?
In-Reply-To: <20825.1479152241@sss.pgh.pa.us>
* 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