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 1l0Wpg-0004Ez-Fv for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 21:40:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l0Wpf-0001Vr-Cu for pgsql-general@arkaria.postgresql.org; Fri, 15 Jan 2021 21:40:35 +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 1l0Wpd-0001Vk-S6 for pgsql-general@lists.postgresql.org; Fri, 15 Jan 2021 21:40:35 +0000 Received: from [64.147.123.19] (helo=wout3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0WpT-0005DM-FG for pgsql-general@postgresql.org; Fri, 15 Jan 2021 21:40:33 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9B823FC7; Fri, 15 Jan 2021 16:40:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 15 Jan 2021 16:40:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=E RUiDgEWBX9P2CfTeyqAzSQwirHt/JUDbXpQh7ZGBPU=; b=ypjtj9c/iu25UOpSY XOPJWhuzpcCXqNeNj6FM9NDPRqP0wRkrcXINMDx1PMoAqvjin3F2shLgpAwPrvER llJ+WAWGbctP5LCVuPfFhpHrKU1n5ONp0mXpoa/3XtSvdSlYmrjZ7d/W6dUy+7VT iNfZ3pRiiHIir57LKapvpa/ZGaprX6KRi/BEatv5mlY/ScVicOtnVTuuy3+sq72G tIx7KXX6gKFuKu1TadQBAPkbjSoIidxbZLgNJV83oplx9XnHs632jAsaN0g70OIf PBBF7s7LpjxWq6stVv4TNDfXuIIOmBI/6F7eSMuw/UfR1jzPQ34BlLD3Lpv7/YBh zPvZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ERUiDgEWBX9P2CfTeyqAzSQwirHt/JUDbXpQh7ZGB PU=; b=lUtKMr/qosYom3x5MskvzKGvneMBuId9xK0nno+2CnLoHKBYRLcBw/jPY +kBS+8v46/l4X1um7KyM9f6+Zu7jmRKFY6QkbeO8T2CuRLQZwbBW1GkHOrRh1N5U hmhKVzj2MOplVsou2nxSxQ+8CxwBR1fLhvV7KLLpKX/1TILjJbws+MZmSrUj0ptX P2TNVnfsGeMr6BGoJNEZdDhOcKfqS7nqpQC3719eCIl2Oofsfg2mY6PfD/43ywAZ mEPj5it6bb1HOLLRdJY7srW1yBrhRTwDJ85vblcoc0r5OvA5J8RYhSPu7M/RIpqy VAKMcWwrECHUCUkEuQUt6B2x0ARAQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtddvgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffhvfhfkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeelueeufeelkeejudehteejtdeuteehtdegteekleeg tdfgveeugfefudfhveekvdenucffohhmrghinhepuggvphgvshiirdgtohhmnecukfhppe ejhedrudejvddrudegrddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.4] (75-172-14-17.tukw.qwest.net [75.172.14.17]) by mail.messagingengine.com (Postfix) with ESMTPA id 9EF6C24005A; Fri, 15 Jan 2021 16:40:09 -0500 (EST) Subject: Re: Accounting for between table correlation From: Adrian Klaver To: Alexander Stoddard Cc: pgsql-general References: <65a6db71-9182-1f0a-02c7-39cd011b34dd@aklaver.com> Message-ID: <13c7b2eb-2c29-9808-0b88-2d17c195921b@aklaver.com> Date: Fri, 15 Jan 2021 13:40:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.19 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/15/21 11:54 AM, Adrian Klaver wrote: > On 1/15/21 10:49 AM, Alexander Stoddard wrote: > > Please reply to list also. > Ccing list. > >> >>     So to be clear, the process imports the data, then you run a query >> and >>     it completes in x time, you then ANALYZE the same data and it runs >> in y >>     time. Is that correct? >> >> The process imports data, ANALYZE is run and then queries run in x time. >> A subsequent ANALYZE, may or may not, change the time to y. >> x may be greater or less than y for any given pair of runs, and the >> difference is vast. Two very different performance domains, due to the >> plan, I believe. If I am correctly reading the EXPLAIN plans the row >> estimates are always way off (and low), regardless of if a high or low >> performing plan is actually chosen. > > Well I'm going to say this is not going to get a useful answer without > some concrete numbers. Too many variables involved to just start > guessing at solutions. Not sure if it would work for the vendor or not but: https://explain.depesz.com/ offers an option to obfuscate EXPLAIN/ANALYZE output. > >> >> Thank you, >> Alex > > -- Adrian Klaver adrian.klaver@aklaver.com