pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Cory Tucker <cory.tucker@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Bad Query Plans on 10.3 vs 9.6
Date: Thu, 29 Mar 2018 11:25:57 -0400
Message-ID: <28562.1522337157@sss.pgh.pa.us> (raw)
In-Reply-To: <CAG_=8kBKebY6A+xTmGvM95B3q41xLtGQoJjckV8VzH=L2t_pUw@mail.gmail.com>
References: <CAG_=8kDXE=qcUOH3ekhXhq2p4anqpK6Cr0iXgkeWFt60MfTaCw@mail.gmail.com>
	<CAKJS1f-E1Y-7+fNZ_PheBhhnqNEcUkT7oKJJSh6YL+Q9e_hFAQ@mail.gmail.com>
	<13699.1522331221@sss.pgh.pa.us>
	<CAG_=8kAky_Fh3zsBuVHeaS-21QtCqdN8PKBVMrNcO2znjgq50g@mail.gmail.com>
	<CAKJS1f84ufJ-GJSj=7QUaRiNDE58wLVD3GH_La_wdfNSaJLWtA@mail.gmail.com>
	<CAG_=8kBKebY6A+xTmGvM95B3q41xLtGQoJjckV8VzH=L2t_pUw@mail.gmail.com>

Cory Tucker <cory.tucker@gmail.com> writes:
> relallvisible has a value of 0 for that table on both databases.

That would result in IOS being estimated at the same cost as a regular
indexscan, I believe, or very close to that anyway.

Is the 10.3 plan parallelized at all?  It's possible that the planner
thinks a parallel seqscan is faster than a nonparallel indexscan
(AFAIR, v10 doesn't have parallel indexscan).

The other likely explanation is simply that indexscanning a partitioned
table is not considered, or not correctly costed.  I'm not very sure what
the state of that code is, but certainly all the v10 partitioning logic is
still pretty wet behind the ears.

			regards, tom lane




view thread (8+ messages)  latest in thread

Message-ID: <28562.1522337157@sss.pgh.pa.us>
Permalink:  ../28562.1522337157@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28562.1522337157@sss.pgh.pa.us

 · 

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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cory.tucker@gmail.com, david.rowley@2ndquadrant.com
  Subject: Re: Bad Query Plans on 10.3 vs 9.6
  In-Reply-To: <28562.1522337157@sss.pgh.pa.us>
  References: <CAG_=8kDXE=qcUOH3ekhXhq2p4anqpK6Cr0iXgkeWFt60MfTaCw@mail.gmail.com> <CAKJS1f-E1Y-7+fNZ_PheBhhnqNEcUkT7oKJJSh6YL+Q9e_hFAQ@mail.gmail.com> <13699.1522331221@sss.pgh.pa.us> <CAG_=8kAky_Fh3zsBuVHeaS-21QtCqdN8PKBVMrNcO2znjgq50g@mail.gmail.com> <CAKJS1f84ufJ-GJSj=7QUaRiNDE58wLVD3GH_La_wdfNSaJLWtA@mail.gmail.com> <CAG_=8kBKebY6A+xTmGvM95B3q41xLtGQoJjckV8VzH=L2t_pUw@mail.gmail.com> <28562.1522337157@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