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 1u3WFV-00H0Jr-7Z for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Apr 2025 08:30:01 +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 1u3WFT-003ANo-6z for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Apr 2025 08:29:59 +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 1u3WFS-003ANf-Tl for pgsql-hackers@lists.postgresql.org; Sat, 12 Apr 2025 08:29:59 +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 1u3WFQ-004tOX-35 for pgsql-hackers@postgresql.org; Sat, 12 Apr 2025 08:29:58 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-85dac9728cdso55901039f.0 for ; Sat, 12 Apr 2025 01:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744446594; x=1745051394; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ENGhu9+zW7du7ulpwSOWYw6Cuvu/9NR4wT3jfepcJ20=; b=bF7pQ+xniWMn5pFx7uD7lqyqFwsKNbxVbaY0KYju3zO8HUM/35C/RfueeCc/ZF6aqN PRkaJ0xQu6Rg0amLtPBwEUYEnZy/Y5UB3SfWK4fRT/0QLibjttuP7U7P3celjxPRZtfC dqXaXtImZ618rfC3yPGSx2oxFmbWG+1AtoOZbRyMWYyBe3cTO/baJmv5pmxWokfa9qI1 OocrNw18lvYl84gQumlB1MCuBF9qYZCf2mAqOBEaYwp3oS0Wkfs8zOGqDXxdJBJ+gFgA co4o8KqohboYHW3Wps6WpaiQY/W/BmrU8k3LJQGT+RyxE8wNTS8wpqeQPUkATFTXJjqc kK0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744446594; x=1745051394; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ENGhu9+zW7du7ulpwSOWYw6Cuvu/9NR4wT3jfepcJ20=; b=C5KtSqzDh6s9yQBgVKiHn0RpXE1AbZJv4x6d4nZ0YU/KpJo1OIuFkql7+DAQxW7QI4 iVMnOodqHBUB+H8irSTz1yi2QRp3VhW7GNQC0bSiW/QGCASDjeKZaa34C3FdGzRuVs+L RZ9FL6DJ2ZMAWFWU5AZn/nrvDGSpHD+uK1QYaSnZyG4lpNmg2BwWy9+xjGpyWBANJgXb 6zlHw/3UqKbfKhn0umgFY5xUKKiWG85bjOddwuVpmxw3icStFc0GIu02VF8m3LrYb8c5 iwvr0AaaypSGMugvDSDKcIO61VEfIGI4j1v+/49WLbsvpK7NTQGBLTPifNtQ9HyVVtRg epQw== X-Forwarded-Encrypted: i=1; AJvYcCWhG0ezvbzX5eASb8k60FDfzaRbNBPSKk1JTlvsZ5b6wOn9kfiji6BZB7+i0o+kPmdIMI1iCrAlP5Idcgxh@postgresql.org X-Gm-Message-State: AOJu0Yyk0W2BEvas5thYSQl1aPeHfv+HgM7RYY4R+e5mLTbz4QTQWagv 1nTuZMRjaFcEtHtyicBZtx/xn66BKsL566zahxoBX4/TkkVGtWa2O7vLoHHK0S+sFtVFNWE7q3n 4wj+5yygaJegtF/mqNQqWMviPDmA= X-Gm-Gg: ASbGncvyfFib5e8JLCWwZsgXoRBscvL66FAkMQKh1ZmXW1XtU40XfOEly/LxSDZ5RhV d6lM9Wyf2nsrZoxK+X8g8nV+PDoV3lm7HZu1O1WKrf9jYdl5iLtVTpG35e2MmVEXVAPw1NalgrZ wAZVJBvAUUJMA7EsVXTjLYyg== X-Google-Smtp-Source: AGHT+IFbzciSSbjZTDftx40Vrc0osVdFN90Ub4Kr8ZGTBf4AuYkqSmmEuddl/qfrnryvHe6iPvCushOtQAZK/uSqzjU= X-Received: by 2002:a05:6e02:1582:b0:3d3:fa0a:7242 with SMTP id e9e14a558f8ab-3d7ec202999mr55667515ab.9.1744446593899; Sat, 12 Apr 2025 01:29:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Corey Huinker Date: Sat, 12 Apr 2025 04:29:42 -0400 X-Gm-Features: ATxdqUEwQi_fE4DwfK-xSVG26PGCxHbZwbZazf7bBO0RifVM1g593A416K2FNCc Message-ID: Subject: Re: Can we use Statistics Import and Export feature to perforamance testing? To: David Rowley Cc: "Ryohei Takahashi (Fujitsu)" , "pgsql-hackers@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008f23fe0632909f3e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008f23fe0632909f3e Content-Type: text/plain; charset="UTF-8" > > at the *actual size* of the relation and takes that into account when > scaling the statistics (see table_block_relation_estimate_size() in > tableam.c). If the table sizes don't match between the two servers > then there's no guarantees the planner will produce the same plan. > Sorry that I didn't see this thread until now. I would like to note that table_block_relation_estimate_size() determines the actual size of the relation by asking pg_class, and the relevant values there are set by pg_restore_relation_stats(). --0000000000008f23fe0632909f3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
at the *actual size* of the relati= on and takes that into account when
scaling the statistics (see table_block_relation_estimate_size() in
tableam.c). If the table sizes don't match between the two servers
then there's no guarantees the planner will produce the same plan.
<= /blockquote>

Sorry that I didn't see this thread unt= il now. I would like to note that table_block_relation_estimate_size() dete= rmines the actual size of the relation by asking pg_class, and the relevant= values there are set by pg_restore_relation_stats().

<= /div>
--0000000000008f23fe0632909f3e--