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 1jlIUB-0003pO-99 for pgsql-performance@arkaria.postgresql.org; Tue, 16 Jun 2020 20:47:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlIU9-0000B4-4s for pgsql-performance@arkaria.postgresql.org; Tue, 16 Jun 2020 20:47:09 +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 1jlIU8-0000Ax-QQ for pgsql-performance@lists.postgresql.org; Tue, 16 Jun 2020 20:47:08 +0000 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jlIU5-0001ty-GM for pgsql-performance@lists.postgresql.org; Tue, 16 Jun 2020 20:47:08 +0000 Received: by mail-il1-x142.google.com with SMTP id a13so3305193ilh.3 for ; Tue, 16 Jun 2020 13:47:04 -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:in-reply-to:user-agent; bh=wZb1wEsNT3xaD8ZlH6QwDRY3HIxQcxMxGyIbplom/Gk=; b=XZngMoyMTBMrqC6j2TyLJ6szcE2yZRBWccIFVnrtZr2TCjLIyTpeRM5N2wNIhuprbS JBQBkG0EloraOc9PpnI8QQNsUVFq99PTM0g0+8nLHdVRpPoShGdhbOx27XOb4XiZw4o/ EZWYDJbD7VecYhg0kGxq15c67Wj3bvxeSwLo1TzYgNTUdQC2hvGBkiKaIoBl4THvSKar 82sRFkX+vTFVumI7MWj2XzjNRFB2aJ3v51xENlkX83b+WTWPMkPTkynjFJOfcUXrhzQ8 87ndSshil8k90TgRnrPkt4++3OV9SbWH7PTmqRlHWqvQx/qvI1gj+ugA28O7I1LMvc13 e7pQ== 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:in-reply-to:user-agent; bh=wZb1wEsNT3xaD8ZlH6QwDRY3HIxQcxMxGyIbplom/Gk=; b=QfS9FtFZJ7HR/zW5iJnQibcU3nA9HOtfDFwJHZIrgejQNcvbiZbRMl6YdUaxZT0RcV cA2QT0RV5Q80STqmwSd4cfptcdADfJTxsScQrmpi57ihvOs7l+ASxdTRrNb+MmuOUJRc BPa48Hmz9uY5CAkinKPWB9EWMno4fENumUJObbpqoID2QVOMrfMoBQP9tyaTv2aTBPY8 ubd2jbLqELXymPt02GWq5cZ0KrTe++k3tT4KXyZXcXMAOLQUteQuldsVW+m8w59pjNX4 Ryc6wIYVMDTMabUm1P98DRbjVHTHspksyfwJpqdRV2+dnlX/CGME0vKJ8FC7IlGyE+HN 2t+Q== X-Gm-Message-State: AOAM532/zzKpSIDhx4yHA9IateW853bTcs0vr3x3Uh8TW6Oz7rGpIgFF d7jG+UOZQIN/Bs0QWtcNkfaYXFVM8afIJA== X-Google-Smtp-Source: ABdhPJzLASLsvI1OItlhMAQF3R79Vn/QWaR0mxUXtJKTANMUClyNmTZFh4L+xR47GZpqW+3ZPlbtCw== X-Received: by 2002:a92:bacb:: with SMTP id t72mr4528141ill.222.1592340422994; Tue, 16 Jun 2020 13:47:02 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p11sm10291095ioo.26.2020.06.16.13.47.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2020 13:47:01 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id D495A8001AD; Tue, 16 Jun 2020 15:46:59 -0500 (CDT) Date: Tue, 16 Jun 2020 15:46:59 -0500 From: Justin Pryzby To: Nagaraj Raj Cc: Pgsql Performance Subject: Re: simple query running for ever Message-ID: <20200616204659.GA20513@telsasoft.com> References: <574079062.1873527.1592339731136.ref@mail.yahoo.com> <574079062.1873527.1592339731136@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <574079062.1873527.1592339731136@mail.yahoo.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. Is this related to last week's question ? https://www.postgresql.org/message-id/1211705382.726951.1592174752720%40mail.yahoo.com Was that issue resolved ? I didn't see answers to a few questions I asked there. > 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" > > "Merge Left Join (cost=55.96..18147747.08 rows=213620928 width=20)" > " Merge Cond: (t0.individual_entity_proxy_id = t2.individual_entity_proxy_id)" > " -> Index Scan using pk_prospect on prospect t0 (cost=0.57..10831606.89 rows=213620928 width=16)" > " -> Index Only Scan using indxp_individual_demo_infrrd_hh_rank_nbr on individual_demographic t2 (cost=0.57..5013756.93 rows=260652064 width=12)" > > Any suggestions or help would be highly appreciated. > > Best regards, > Rj