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 1ihBdw-0007eA-Bx for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Dec 2019 12:08:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihBdv-0005WE-5r for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Dec 2019 12:07:59 +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 1ihBdu-0005W7-NH for pgsql-bugs@lists.postgresql.org; Tue, 17 Dec 2019 12:07:58 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ihBds-0004lE-Ae for pgsql-bugs@lists.postgresql.org; Tue, 17 Dec 2019 12:07:57 +0000 Received: by mail-wr1-x443.google.com with SMTP id c9so219283wrw.8 for ; Tue, 17 Dec 2019 04:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JVo9H4YsCWt4LKNYoeODK0lQhfKaLBHRPs5w4fOuQoE=; b=RLuvQ5unpvaabbS5k9G8XEuDvu8wV19fAznWGyxB2se3A0Z8uAidr3AFuav9HQOns5 PkiJ/eLPQ92rzQLAFi5eOiC3q8ylIHUfLj7m4OEC18ls5KBbykP4HS7SjBiulFOxjIu4 z7xjv+QxK4RTbjH6GIvdak2i1ZxkhaKMaKsf9YZcADzi7RBEGCAIev7BzjRe1QRDKfUJ bF/36qWyOIAXMbJGXrn9UFa6FKETxvKPpRpWURsSnjXmWO47aE3GYL7LUlOT5xBWccl3 +Vu8MGUBUF50vvtuJtIGahkzcYtdrjpq51/L7WDmIzX16m32tcxVHHAZOvLe63AxLkTZ G9lA== 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; bh=JVo9H4YsCWt4LKNYoeODK0lQhfKaLBHRPs5w4fOuQoE=; b=q2u1Rv3k3WU09YYMufNF/SJ0/hrEiJ6sD4/VawwdH7yvIgWemQrXcjwRjSyJGk4cRM hHIdjW+LyHU2jJM0E/nsE0B7VyKu1JSh4N9u3RZtLArvKbSoCDDrM1kxspKukIGsXTUA Xw/kB/BBH/Nx3YjQOYYrzcWSJaF+aJeStY5+0x9mClWPIkLwLfiRL7d9qmGq2n4ylJXU wOj+J3teN8ZF38hEYunOXMrZVNtcXQsw+gaUgmhoCFE1JW++ej55H2OWg3/lmN4pOAwc 23XKCjo39+t/wF+HgvcAy/pEwDL1qySH63yttvYUrPsRdrBcZbIFMb+l1uttqkJKRlL0 pH3g== X-Gm-Message-State: APjAAAXugJlUWEDtljDTAyQsFOKLOzJWlcnOqcSiMB3yoTbTK32TvgLL v9Hc+TTXQKmRWmVofk02ivysVA== X-Google-Smtp-Source: APXvYqxnAZ9E/Na1JsxuKV7vkD3tP3ezcN/gcouBBzkVD06W99uclms2B1ApnHsTNGSsB6h/LedmGQ== X-Received: by 2002:adf:f2d0:: with SMTP id d16mr38168280wrp.314.1576584475119; Tue, 17 Dec 2019 04:07:55 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id h2sm26384245wrt.45.2019.12.17.04.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 04:07:53 -0800 (PST) Date: Tue, 17 Dec 2019 13:07:51 +0100 From: Tomas Vondra To: avinash varma Cc: Pavel Stehule , Tom Lane , Heikki Linnakangas , PostgreSQL mailing lists Subject: Re: Planning time is high in Postgres 11.5 Compared with Postgres 10.11 Message-ID: <20191217120751.34fmwkshfanjqws2@development> References: <24176.1576509007@sss.pgh.pa.us> <12053.1576513014@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Dec 17, 2019 at 05:04:18PM +0530, avinash varma wrote: >>> b) can you compare size of databases, indexes? >I used the same backup to restore on V10 and V11 . So the no: of indexes >and size of databases are same. > >One observation is that after pg_restore, we are doing vacuum full analyze >on both V10 and V11. > >This is causing the slowness on V11 . Before vacuum analyze , same query is >performing well on V11. > >Is there any changes in the analyze script in V11 when compared to V10. > You've been asked (at least) twice to check size of statistics stored in pg_stats. It's really hard to help you when you don't provide important information like this. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services