Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXDGI-0001gE-ON for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 22:45:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXDGH-0004hj-F5 for pgsql-general@arkaria.postgresql.org; Wed, 12 Dec 2018 22:45:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXDGH-0004hR-1I for pgsql-general@lists.postgresql.org; Wed, 12 Dec 2018 22:45:49 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXDGE-0001lf-8f for pgsql-general@lists.postgresql.org; Wed, 12 Dec 2018 22:45:47 +0000 Received: by mail-ot1-x335.google.com with SMTP id a11so53622otr.10 for ; Wed, 12 Dec 2018 14:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=1L9GN2UwBK1oJ11UJHO3MDORvn8lM4EBdkTk+1GemfU=; b=qUIgd0J/xt53MzcRkfWj+OlzhE1kKlHfPVWaLXmWEfznbFp+domuXC/KdStaRnaK9r FCJYoTcjOy/9rD8Wpu6UyEz6X/3MwGb0ZL1jdIt2XUx5PctJt6pZgtkv6tbtRZlcmY4G fDJdB1YO85qsH5YTlncaQueIkn/Z+e7lztiXkDBGlcPgXSVA2fhgRFf89BmUSYkhXHm6 rBBmvX79DHHatIQlmPl9qZqwp6ypoDubrqH4ZzMyb7g68Onw9x7jA2Rt1AfbF2y9mJ3T vevtoFod6HiF/ZU22oQjU/6ZQqQ9wPVycDN8fiM++pjF0MzX4K3Sb1kUY0CMUrdQTW43 Q+Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=1L9GN2UwBK1oJ11UJHO3MDORvn8lM4EBdkTk+1GemfU=; b=IFQSjz0nWliFSxmPMlFP8HZaM0mVJb2abHI/widVqUJdFPJ/iBS3fULW81YNWoAC5d e6U4rgn+1ZQ13vivBbPvwpQvyVMf5Zwfxzo6AbzvIiWdOWk90B7Wk6nsLfCnbqUDkzA8 lPz74s+z03xGkpZTy562Uf60gN0JrERzqGEFt40rCZRpVZKYDGhoUiaXoX2ayJ9rRCjy 259QawNnU09+BmEttJrf0kXzHcLOvC1NjRK4p8nVm5zHY0SzPeC/zS9AIlV6NnYwiBMX 1UIosgsBQa8u09qM7Mmfyv3wBa5ctvKY642904a5Na3i4/cW4f0t1Bf/yoL6Ud5uXwKz 3r5Q== X-Gm-Message-State: AA+aEWaT6Yo8RKMpxS0AFq4GOWi9dKy4VmHphd3AsH2K9BQjMv7dUDzq tcOspwPCM9ID39lMNU2CXG5UHQY8 X-Google-Smtp-Source: AFSGD/XNm8DHO/IDNu72Dre+bqLU0lKW+z2pXnvfh0zsG9k1UNuY2uGbSaMaJ2Gf2lmFhM+CXNFyJQ== X-Received: by 2002:a9d:762:: with SMTP id 89mr14362067ote.89.1544654744741; Wed, 12 Dec 2018 14:45:44 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id d66sm38755oia.29.2018.12.12.14.45.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 14:45:44 -0800 (PST) Subject: Re: explain analyze cost To: pgsql-general@lists.postgresql.org References: <1544654267.3583234.1607577016.1555678D@webmail.messagingengine.com> From: Ron Message-ID: <01ad39ba-d283-875f-6121-76141a6a4874@gmail.com> Date: Wed, 12 Dec 2018 16:45:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1544654267.3583234.1607577016.1555678D@webmail.messagingengine.com> Content-Type: multipart/alternative; boundary="------------DF97A03FA3ED5113B83256A8" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------DF97A03FA3ED5113B83256A8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 12/12/2018 04:37 PM, Ravi Krishna wrote: > I am running explain analyze cost on a SQL which reads from two large > tables (122mil and 37 mil).  The query is an UPDATE SQL where we use > derives table in the from clause and then join it back to the table being > updated. > > The explain analyze cost itself is taking forever to run. It is running > for the last 1 hr. Does that actually run the SQL to find out the impact > of I/O (as indicated in COSTS). Yes. https://www.postgresql.org/docs/9.6/sql-explain.html "The ANALYZE option causes the statement to be actually executed, not only planned." > If not, what can cause it to run this slow. > -- Angular momentum makes the world go 'round. --------------DF97A03FA3ED5113B83256A8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 12/12/2018 04:37 PM, Ravi Krishna wrote:
I am running explain analyze cost on a SQL which reads from two large tables (122mil and 37 mil).  The query is an UPDATE SQL where we use derives table in the from clause and then join it back to the table being updated.

The explain analyze cost itself is taking forever to run. It is running for the last 1 hr. Does that actually run the SQL to find out the impact of I/O (as indicated in COSTS).

Yes.

https://www.postgresql.org/docs/9.6/sql-explain.html

"The ANALYZE option causes the statement to be actually executed, not only planned."

If not, what can cause it to run this slow.


--
Angular momentum makes the world go 'round.
--------------DF97A03FA3ED5113B83256A8--