pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-performance@lists.postgresql.org
Subject: Re: simple query running for ever
Date: Wed, 17 Jun 2020 00:10:37 +0200 (CEST)
Message-ID: <VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena> (raw)
In-Reply-To: <20200616220526.GK20404@telsasoft.com>
References: <574079062.1873527.1592339731136.ref@mail.yahoo.com>
	<574079062.1873527.1592339731136@mail.yahoo.com>
	<20200616220526.GK20404@telsasoft.com>


På onsdag 17. juni 2020 kl. 00:05:26, skrev Justin Pryzby <pryzby@telsasoft.com
 <mailto:pryzby@telsasoft.com>>: 
On Tue, Jun 16, 2020 at 08:35:31PM +0000, Nagaraj Raj wrote:
 > I wrote a simple query, and it is taking too long, not sure what is wrong 
in it, even its not giving EXPLAIN ANALYZE.
 >
 > select T0."physical_address_sid", T0."individual_entity_proxy_id", 
T2."infrrd_hh_rank_nbr"
 > from "cms_prospects".PROSPECT T0
 > --inner join "sas_prs_tmp".DEDUPE3583E3F18 T1 on 
T0."individual_entity_proxy_id" = T1."individual_entity_proxy_id"
 > left join "cms_prospects".INDIVIDUAL_DEMOGRAPHIC T2 on 
T0."individual_entity_proxy_id" = T2."individual_entity_proxy_id"

 Pardon me for saying so, but this query seems silly.

 It's self-joining a table on its PK, which I don't think could ever be useful.

Where is the self-join? 


--
 Andreas Joseph Krogh 

view thread (10+ messages)  latest in thread

Message-ID: <VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena>
Permalink:  ../VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena

 · 

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: andreas@visena.com, pgsql-performance@lists.postgresql.org
  Subject: Re: simple query running for ever
  In-Reply-To: <VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena>

* 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