pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Johan Fredriksson <eskil@kth.se>
To: pgsql-performance@postgresql.org
Subject: Re: Slow query with 3 table joins
Date: Wed, 26 Apr 2017 13:35:57 +0200
Message-ID: <1493206557.30225.5.camel@kth.se> (raw)
In-Reply-To: <CAMgh6pJ_i+w-xP+FJiNbz6pSKJDbHnaYPyh9bnb5xUYr4PBH6g@mail.gmail.com>
References: <CAMgh6pJ9KLab1t7iqcr=7m4xL0V1kPyceanamxAywSYs+Cxn=Q@mail.gmail.com>
	<CAMgh6pKk+hdnjaWxJ5mr0MpmbK-i-UHq35QB2C9LorXRNUkuEw@mail.gmail.com>
	<1493187867.30225.3.camel@kth.se>
	<CAMgh6pJ_i+w-xP+FJiNbz6pSKJDbHnaYPyh9bnb5xUYr4PBH6g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>


> Hi Eskil - 
> 
> 
> The I believe the id-field you're referring to is the UNIT.UNIT_ID, I
> could change this to a varchar, however that column is not used in the
> query in question, so that wouldn't have any effect on the query's
> performance.

Sorry, I did not notice that the column "unit_id" existed in both "unit"
and "field" tables.

        / Eskil





-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (10+ messages)  latest in thread

Message-ID: <1493206557.30225.5.camel@kth.se>
Permalink:  ../1493206557.30225.5.camel@kth.se/
Also on:    postgresql.org/message-id/1493206557.30225.5.camel@kth.se

 · 

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: eskil@kth.se
  Subject: Re: Slow query with 3 table joins
  In-Reply-To: <1493206557.30225.5.camel@kth.se>

* 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