Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uH85d-00E2nk-3N for pgsql-hackers@arkaria.postgresql.org; Mon, 19 May 2025 21:32:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uH85c-001Xl8-7X for pgsql-hackers@arkaria.postgresql.org; Mon, 19 May 2025 21:32:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uH85b-001Xkz-SU for pgsql-hackers@lists.postgresql.org; Mon, 19 May 2025 21:32:03 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uH85Z-002klb-0P for pgsql-hackers@lists.postgresql.org; Mon, 19 May 2025 21:32:03 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-86135ad7b4cso274955939f.1 for ; Mon, 19 May 2025 14:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747690320; x=1748295120; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=NsetY3wtwz9rYb32o/gT+cxX4t2+zhneGrOkRMzEEtU=; b=NYqaHgY3EL0xrx5I420DmMWWslkvN3ILwxk5VtA6j9qJUa7uzYvRbLDiCXHj7js9f0 g8zrBmLcOHwqhvPDASdet13N5CfCaHbOlGewzqplSIlNh1RlVQG+5OtW1KT4fM1Hqntx OQc16V+AGCP7Dj3f5n7nvH4Frpwm0ikteay2uuWgCs7on12Hiu+l20uONKDk8GMzn0X4 x/mqxHxrVrxlb25KpxzOllhr+LY5iNNwPd0IHrJR8pGTFHqdcmnYhE0/2cZh1wqK6CbI sEfNPFbWWLgKCQ3lGIFpFa42mkc7i+oxv1Z0kvI4mrDAeW4g/DW5Fc2MMXgeEKEY1aTy O7Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747690320; x=1748295120; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NsetY3wtwz9rYb32o/gT+cxX4t2+zhneGrOkRMzEEtU=; b=MVbmiLAMfofGWDluSI93iVTmTvr0r1om1Sbe267VWocKguKrUGHnKmT24vShSCVkjf ml0ZcnY2NSNSjIg5Ixf5ueQpu1r/OD9TwLestPZNquBay/spQBPn79c8OtKKTd89unk6 U9PPS4NpZ/nuYBB5MTyvmESiZPjrUcjD6evGm0HPxT9GLzDr2uLgcfoNcR9nCUyCnq9A kd7oXFnc7NsCL13mM2xN1C4fFOQuQQG/MVOgbdgBfC+cPUwCCM/7UYHPY7XRP+73pDv6 VvyEJvO216H+PjwAJr8FJBYWwTV6W09ZT0DEOedyeGyue7RjIfO840CbDzY+tAnubH8I HCqA== X-Forwarded-Encrypted: i=1; AJvYcCX4KfONOBzkURGWP5BHjsH8YyR2qu+taPgaToyEXbUSxUtq7fD7vsrOfsZe+lkdyCPWdKj2Mwq9TMU48nWF@lists.postgresql.org X-Gm-Message-State: AOJu0YzkAVccgm6AK1sdjuaglwiPemU1HN1RDDeQkTIVssxh/4wGK2TD D0PT4T8VqbBRHiJ13JvCYXJFHESjk7NAWlFlAZJ85J3wxNkqo3Wpq6m+ X-Gm-Gg: ASbGncuqGCapytbTW7rM3d1ESgiUAmvdliKwEwXtZF2PEPDEtwVjiY6imCz/+Vv8sXu eFpuhuF4wN2yFhGDl9UKYmbOkmzIAhtOiET/g655wD1+URAyYAdPuUic85MY49kQLYax7JjfVrk gR+ChTutCf6Xv2dHgkx/BGOqV3H6je9v4QReqrIHlfMK3x0lVEktNbUY2UnMOiYtDib4MQexSG6 58GxDX205C+qux01TIopDmXQpYFqjuWUttpdPoKPth9QiPr6MeNhXwcBr5vIZm+xRz7uTFyPvTg KRN6dXQ2cWYs8++HYSfylfWZigibTVq8W9Vr1tZoPjpVQwqIRHw4iZAPzXba1Kd79M+vvvHwfDU qaawTtwv7L8j/BeSamd1o8F+YLKuxcguaFcvVxxL+RA== X-Google-Smtp-Source: AGHT+IGzKxfYsnzEKSJbCrGRb+BJGQNKUDR8qV2c2+x+OpHhBmXf5UMAGrsQ1zeLQ+92f30BFP38Hg== X-Received: by 2002:a05:6e02:3e06:b0:3d8:2023:d048 with SMTP id e9e14a558f8ab-3db84377bbdmr149787355ab.22.1747690319662; Mon, 19 May 2025 14:31:59 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4fbcc38a296sm1873332173.23.2025.05.19.14.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 14:31:59 -0700 (PDT) Date: Mon, 19 May 2025 16:31:57 -0500 From: Nathan Bossart To: Hari Krishna Sunder Cc: Corey Huinker , Jeff Davis , Robert Treat , Robert Haas , Andres Freund , Tom Lane , Michael Paquier , jian he , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Subject: Re: Statistics Import and Export Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, May 19, 2025 at 02:13:45PM -0700, Hari Krishna Sunder wrote: > I think it would be better to revert 9879105 since there can be a > considerable number of true empty tables that we donīt need to process. I'm not sure that's a use-case we really need to optimize. Even with 100,000 empty tables, "vacuumdb --analyze-only --missing-stats-only --jobs 64" completes in ~5.5 seconds on my laptop. Plus, even if reltuples is 0, there might actually be rows in the table, in which case analyzing it will produce rows in pg_statistic. -- nathan