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 1jdWn3-0002mq-Ok for pgsql-general@arkaria.postgresql.org; Tue, 26 May 2020 10:26:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jdWn2-0007vT-Hc for pgsql-general@arkaria.postgresql.org; Tue, 26 May 2020 10:26:32 +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 1jdWn2-0007vM-95 for pgsql-general@lists.postgresql.org; Tue, 26 May 2020 10:26:32 +0000 Received: from securemail-y55.synaq.com ([196.35.198.122]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdWmz-0004N6-6U for pgsql-general@postgresql.org; Tue, 26 May 2020 10:26:31 +0000 Received: from [197.90.32.26] (helo=[192.168.0.8]) by securemail-pl-omx6.synaq.com with esmtpa (Exim 4.92.3) (envelope-from ) id 1jdWmj-00015K-SV for pgsql-general@postgresql.org; Tue, 26 May 2020 12:26:13 +0200 Subject: Re: Slow SELECT To: pgsql-general@postgresql.org References: <0fb25867-78d2-d57f-134a-c3fccac7bbde@chagford.com> <06c641a3-cd43-79f7-9e00-ed5d9f10028f@networkz.ch> From: Frank Millman Message-ID: Date: Tue, 26 May 2020 12:26:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <06c641a3-cd43-79f7-9e00-ed5d9f10028f@networkz.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SYNAQ-Pinpoint-Information: Please contact SYNAQ for more information X-SYNAQ-Pinpoint-ID: 1jdWmj-00015K-SV X-SYNAQ-Pinpoint: Found to be clean X-SYNAQ-Pinpoint-SpamCheck: not spam, SpamAssassin (not cached, score=-1.1, required 9, autolearn=disabled, ALL_TRUSTED -1.00, DCC_REPUT_13_19 -0.10) X-Pinpoint-From: frank@chagford.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-05-26 12:02 PM, Christian Ramseyer wrote: > Hi > > On 26.05.20 09:22, Frank Millman wrote: >> >> I have looked at the EXPLAIN, but I don't really know what to look for. >> I can supply it if that would help. >> > > My favorite approach to tuning Postgres queries is: > > 1. Run EXPLAIN ANALYZE > 2. Copy/Paste the output into the fantastic https://explain.depesz.com/ > > This will turn the somewhat hard-to-understand explain output into a > nice colored structure. If it's not obvious from the orange-reddish > boxes where the slowness comes from, please post the link here and > somebody will certainly have some advice. > Thanks, Christian. I will definitely look into that. Frank