Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlK9H-0007bn-Ey for pgsql-performance@arkaria.postgresql.org; Tue, 16 Jun 2020 22:33:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlK9G-0004ax-9p for pgsql-performance@arkaria.postgresql.org; Tue, 16 Jun 2020 22:33:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlK9G-0004ap-2p for pgsql-performance@lists.postgresql.org; Tue, 16 Jun 2020 22:33:42 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jlK99-0002pO-50 for pgsql-performance@lists.postgresql.org; Tue, 16 Jun 2020 22:33:41 +0000 Received: by mail-il1-x129.google.com with SMTP id j19so169299ilk.9 for ; Tue, 16 Jun 2020 15:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=EbTMyScbLmlN+HHmAJIo0c+uElb1x3m62E0CVC6qDr0=; b=w0yVVZlVd4rEQNcKvedcRXydR/Z5z9Ol0K0SbahA5RTunxC7KKX2s9V74Aya0qh7Nk S+AN6+4ahSn0HQ+uzkWGjcoelu1z0OIUIr80/h6XcMdkVik/tMIYuTz0zRghzhrM8kGC Ha6Rb4kbeAktiV3KjwQU0wbTtUx/m6lCoZPzbAU+xtiVxMP/Kxy3crEqDLycIkS8fpYi z0i7sjNBro4mV8WgBuY3e9tiJwjDQi1Ns1qV5vxcoM0zaSr5kkSw7JxAkDfROR4fvslF 1nVNP/WnVBf8biyJoIP8/Pg2iijpwqZSrAzx7HzdU+YKyxV06Bxpm+3Jk3X1w0mH5zSW YzXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=EbTMyScbLmlN+HHmAJIo0c+uElb1x3m62E0CVC6qDr0=; b=YidakO6vc9sDhejZ+QcKHtwZ6LcVwVWtUv0WZ5EPtulUw6+NDnt4/ORkoq6SCuZnR8 NSH/md5sPlvAIL3SC6sE3V11dRewmT/cM9D0nuHglZsgaguy/U39Q3f4qtoSD1GskOQG 730Lj98UUgvtANxNF3GDFpJCUGrFKwhe4v6EDGrM254GR4leaO5nHSrMqig6h+n6dHnk SiqloyNH74SKsqx6Oq8lhUcljeAOgb04Krw8eEB3jYZWkmGWeRkXB3AiNEAZVN+gLAeJ pBZS5xojBhW0ElAqcf/Tjo3t2OhEPhot+xXg9+uoKBitHW49MMzXT2LSbY3XtdRfn8c7 i/Fw== X-Gm-Message-State: AOAM533RQsaXfXjGZf5ikuPxOPA9/DDt2lxnsEuAp5aaFFbZHqNqVJin OgRv58POIR/fXIPZZyrf6trLUfnHfB4R7A== X-Google-Smtp-Source: ABdhPJxseSCwzoxK+NYiFlhWLhVS/7A+h8Bn4zyYFaC95Hv1uvlNSmAENN/iNpxWxk7Vt8Chr+StoQ== X-Received: by 2002:a92:190:: with SMTP id 138mr5155847ilb.5.1592346812402; Tue, 16 Jun 2020 15:33:32 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t5sm10927789iov.53.2020.06.16.15.33.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 15:33:31 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 4139E800127; Tue, 16 Jun 2020 17:33:30 -0500 (CDT) Date: Tue, 16 Jun 2020 17:33:30 -0500 From: Justin Pryzby To: Andreas Joseph Krogh Cc: pgsql-performance@lists.postgresql.org Subject: Re: simple query running for ever Message-ID: <20200616223330.GL20404@telsasoft.com> References: <574079062.1873527.1592339731136.ref@mail.yahoo.com> <574079062.1873527.1592339731136@mail.yahoo.com> <20200616220526.GK20404@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jun 17, 2020 at 12:10:37AM +0200, Andreas Joseph Krogh wrote: > På onsdag 17. juni 2020 kl. 00:05:26, skrev Justin Pryzby : > 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. > > > > from "cms_prospects".PROSPECT T0 > > 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? Sorry, I misread. I see now that "cms_prospects" refers to the database. -- Justin