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 1nNjRb-0001rc-De for pgsql-performance@arkaria.postgresql.org; Fri, 25 Feb 2022 22:52: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 1nNjRZ-000879-Vz for pgsql-performance@arkaria.postgresql.org; Fri, 25 Feb 2022 22:52: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 1nNjRZ-00086z-GU for pgsql-performance@lists.postgresql.org; Fri, 25 Feb 2022 22:52:09 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nNjRV-0000nj-D4 for pgsql-performance@postgresql.org; Fri, 25 Feb 2022 22:52:08 +0000 Received: by mail-il1-x12f.google.com with SMTP id 9so5449188ily.11 for ; Fri, 25 Feb 2022 14:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jfkk1neV3DC/ifzpeF71Myy2w/aRw818+a47Dyf8AwQ=; b=C1tIGRVY9hAqSWzA/iOwjh5PHaC1LfEJrgnd5A973/VjCRgZO19TpMsu25eLw6whjG eiVlyAtD9FV32izudZmqHXjtQv3itrwFmXw7qNh+lI89AnZjpfwGNL8MrgeaRxuo4vE4 2D5bcCFwC35vbrVGpJ11Ssbq42NrIMIiZ6xCCHSFG7Xw/E+RVJWEQCQUw6ka1Mk3gfF3 4xwPbB04U71pQIwUKBn4aPXHHzN4VZ8J7pu1PJ8s70F912koJ65ArU49ye/32ermt9H6 iJDv2dusikZJWI5VdjeGdpWKi+NKq1sQ839a2s2tO8s1NBwutjlS8mwBiegXEleIAqf/ UpQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jfkk1neV3DC/ifzpeF71Myy2w/aRw818+a47Dyf8AwQ=; b=qJGJBsciN7qW9LbK/Vy/asgjPEoJUFf1uxDcN9Nrbgn3NrcNQbZBn6qtUqeTEd1ap7 /JI4oL+P6I9zZrgLQa1IZewn7fIzgEeHOxDOKHlrlkfknaVntXmBUXJMGUOqAgD7GxIY e+gdb4SZcuPlO+yV8qqLygdciSMJvWM+R4JIVQY1L4jHEy2t1lvW13EMpBxj00uwkeJn EiclL6SojthLhfV3i1kKa7aUXG6UWrLO1Rbf6X7oPGkqs0g2LthacmzJm3XJt2GStNHi +vXCNVEHCuQpMkL84xd4dnAjPbi251mKfUT5ID0jUfPlKczVXA7x/8IfZKuIr6aMFffk q2Hg== X-Gm-Message-State: AOAM532ApSNujsEEGyA1eaWE4bVgh6zBgMp5/dZWifGemThZCMOSGyy9 8OUcELUTfY0zgCX7OrcVacyq8w== X-Google-Smtp-Source: ABdhPJzlTEBG0vH/Tq0tGB9D5CuS6m+DU1I9b3aYG4YJ8+uSiX3TCW1zgaYJ/6Gblu6+5QT39iS43w== X-Received: by 2002:a05:6e02:168a:b0:2c2:8f47:3b10 with SMTP id f10-20020a056e02168a00b002c28f473b10mr8254985ila.265.1645829523369; Fri, 25 Feb 2022 14:52:03 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d15-20020a056e02214f00b002bc80da7cc6sm2457064ilv.72.2022.02.25.14.52.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Feb 2022 14:52:02 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 73371800BC8; Fri, 25 Feb 2022 16:52:01 -0600 (CST) Date: Fri, 25 Feb 2022 16:52:01 -0600 From: Justin Pryzby To: Ayub Khan Cc: pgsql-performance@postgresql.org Subject: Re: slow query to improve performace Message-ID: <20220225225201.GH9008@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Please provide some more information, like your postgres version and settings. Some relevant things are included here. https://wiki.postgresql.org/wiki/Slow_Query_Questions -- Justin