Re: simple query running for ever - Mailing list pgsql-performance

From Andreas Joseph Krogh
Subject Re: simple query running for ever
Date
Msg-id VisenaEmail.75.e9daa0e3fd342c43.172bf2e861a@tc7-visena
Whole thread Raw
In response to Re: simple query running for ever  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: simple query running for ever
List pgsql-performance
På onsdag 17. juni 2020 kl. 00:05:26, skrev Justin Pryzby <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

pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: simple query running for ever
Next
From: Justin Pryzby
Date:
Subject: Re: simple query running for ever