pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Gibson (DB Administrator) <postgresql@mailpen.com>
To: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
Date: Sun, 30 May 2021 21:23:43 -0700
Message-ID: <5463af86-9007-1094-78bf-18e54c60edaf@mailpen.com> (raw)
In-Reply-To: <2370D2C6-4D91-4C96-9410-11EFD9954B21@thebuild.com>
References: <88dec70b-eb63-0b72-0b5d-253851ef127b@mailpen.com>
	<92cc8563-195f-8727-d887-5f2bb63f231f@mailpen.com>
	<2370D2C6-4D91-4C96-9410-11EFD9954B21@thebuild.com>

On 2021-05-30 20:41, Christophe Pettus wrote:
> On May 30, 2021, at 20:07, Dean Gibson (DB Administrator) 
> <postgresql@mailpen.com> wrote:
>> The first two JOINs are not the problem, & are in fact retained in my solution.  The problem is the third JOIN, where "fips_county" from "County" is actually matched with the corresponding field from the "zip_code" VIEW.  Works fine, if you don't mind the performance impact in v10 & above.  It has now been rewritten, to be a sub-query for an output field.  Voila !  Back to sub-second query times.
> If, rather than a subquery, you explicitly called out the join criteria with ON, did it have the same performance benefit?

I thought that having a "USING" clause, was semantically equivalent to 
an "ON" clause with the equalities explicitly stated.  So no, I didn't 
try that.

The matching that occurred is *exactly *what I wanted.  I just didn't 
want the performance impact.

view thread (54+ messages)  latest in thread

Message-ID: <5463af86-9007-1094-78bf-18e54c60edaf@mailpen.com>
Permalink:  ../5463af86-9007-1094-78bf-18e54c60edaf@mailpen.com/
Also on:    postgresql.org/message-id/5463af86-9007-1094-78bf-18e54c60edaf@mailpen.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: postgresql@mailpen.com, pgsql-performance@lists.postgresql.org
  Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
  In-Reply-To: <5463af86-9007-1094-78bf-18e54c60edaf@mailpen.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