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.96) (envelope-from ) id 1w3FL4-0012lO-01 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 15:31:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w3FK1-000lYh-1b for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2026 15:30:05 +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.96) (envelope-from ) id 1w3FK1-000lYY-0c for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2026 15:30:05 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w3FJy-000000001e0-3gG1 for pgsql-hackers@postgresql.org; Thu, 19 Mar 2026 15:30:05 +0000 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-7d7e9b97a73so6877a34.0 for ; Thu, 19 Mar 2026 08:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773934200; cv=none; d=google.com; s=arc-20240605; b=ccHoi5pyxP1/Biap1AF2Mk6rRqI/oy1Kl1lhb24wT1gZRZ0zhuBjLrD6uXrZ3iZzLU ZVgDt8gUUFxW+VGztj99GDY1HfqH5hQ2in0vAJPWQ9qGsHNimL0Cptd5GqX+0+DwLcK6 pL1W8f9ZH5hWXx9X7Ha1vYfbPOcPKQS+7Sm+fG2bWUvkVLBcTZsUQ86M1F+ID0gMhDdB b8gQf+m3xdlV+fxQ971oPdC2AGRuN1LGisZaBJwruQ5CuhpufFthV1cn3aUaD+8qzU5r 9wUZ3H8RuahubLruCjfhOs6dJ0gx1FxbZJ1Cfss7P4sq0laHzQeORAD9WH2+PsaVoMJV TuqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tEgaEDs5Dix+kWDt8LSWqGe/qkHNFlK0S8heDqml6rQ=; fh=+Dm+MtelKCPVyby6d27t0I7WjBtRTZijRD4gGLDIOTw=; b=Gw3r+XJBqJDQ/wnUOxyIcCwcAVtYtgWOMQR7X/UXIooEVBHw1DTLAsMkYDX2D/0BNJ TbN2GsaUVIBUZx8yHBVSQgNJN4N55igcUiHSOmCOMBgfKTlcF6FVfzntQiW+O7bJ/VT4 Bgtz3xjkp3TZxAuSe1RaN2f42Rj+HSTZo1Ip8YRwX8RLk9jqVCdw0pSjFTuY8D2+hsVk BPjjTm2F52YssSdNUu9uazY2sH352SJeRpaxXRDctSRA6uLNxmdkOgXovLL1WjuEsI+v YDXSCWzVRfiip/3WhXj+KVyEH/8ui8Y8uhrwXE7iek6WLPj80g3C1tfEE/pKiA0FQm0Y rIUg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773934200; x=1774539000; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tEgaEDs5Dix+kWDt8LSWqGe/qkHNFlK0S8heDqml6rQ=; b=JMlpgJ+E/7a9ZoVk/ueB+SNLLG0TnsxSySYlXG7BJRj42EoiJgoFxV1ukniUybm2Cf ei+2tkcXdC+wWQ0foJJy0EtwjqZqosbAKrk3vcOmEplo7rVFr3GuknwvM19jGQ+RvbE2 5Ljxa9maU+14TxOKSZ/M9HnXSHYkxUObudIVFsyKMoDYf7aOK9twdMwJIeMCBKdQaE3Y /UTeLPEqVOsKgqK7THFDZPVAgsmELmlVvivwCvD8fH4RMKG3ecVauuw245NjBZfOLiV8 PfxK0hrQjouC24KfQKCpTjTCxzbDtV+GBZh610nwpFMchHpOgbBEu0OCAHMtZ8aduwvZ oJOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773934200; x=1774539000; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tEgaEDs5Dix+kWDt8LSWqGe/qkHNFlK0S8heDqml6rQ=; b=B45DD5WxcN/oESP8rjc7AAGF0erpf+IxNIijebFpBUe7zTPs4jOK37zOjU4lqEMZDH bVIM9odic//OCk+W7aQms0cx+viE0EIX+coUVOQMHgpgZigXCGWFBFoU1p+0f3BmNUCF zdCqxTQGZnrdp6q7VtIULlPDre7gomHHnBEi5Pum8t5IDOJYF9xnBg2xc76O3CFVo5MQ rrBB4A+3ywIAOkXXqth7yPuIDQ9nrs2NOJHBDvZA4OwfVoCSVs7IS/cnCWnJJf75KGNQ 0LQzFrwtdIkNhMYXOe1LJgSOttgbvMcSD2jMJ2BUmK9Qe+PDW1e4frUqMZcASdmPNQB1 B0Gw== X-Forwarded-Encrypted: i=1; AJvYcCX0IIjvBEQWqZeUbwxJOOBY7FiYiy2p1ybUFw3JU9cVJQWAUbiHg8KSKAeacCT/qC7lSCefTV/LsZCsd+vU@postgresql.org X-Gm-Message-State: AOJu0Yz99tiPetIwT+iCdZOriKJfrlqJfmwT1+pPnDR7cMOeQHSRhIuL /2Cy/aN74uxuJtWNyUY6kRL6VaxOxD2AHPMJqJzEbOYzAOP/cwDTVhANZQPpcm5V2HvvVZBSjWe DEN0CvMQ7KJ0F49OLPxPbF2iZs1W9yu8= X-Gm-Gg: ATEYQzzoKooibH//lf15bv+kc7+TywHrFjTrQqjJuoktl8mHxNC7uj+vSFy2L/lfRi8 k1SXLZkLw4IO/KKde7zfYHnoOvjYeho080eSMsoX2h5n8M+gnpK/Rlfl3UM0fkdT9q+ay0iGsEo ozJzx76b4BX95XUq1J+Y4CIuRiMavFxhJe02fDJwQVr9cRGVvtB0VxqBb4Y0A1PvcVn4ck96x3s D/BqTKlGnijSAq8DAvXl8FNJfDLAoJPYssF2oOFz8VTLzU1IvQcL0st9L9BmYSmEy0cSJib2p6V s3oj5C1sPxY+nB3Bn1BcuSO7aSibB7SX80m4b3CkYg== X-Received: by 2002:a05:6820:229c:b0:67c:eb3:7d75 with SMTP id 006d021491bc7-67c183876b4mr2729303eaf.3.1773934200113; Thu, 19 Mar 2026 08:30:00 -0700 (PDT) MIME-Version: 1.0 References: <408cd5617d954ba1aca99f26b4693fa2@localhost.localdomain> <4a3bfa370a7d48d1965b12572a0de0e5@localhost.localdomain> In-Reply-To: From: Fujii Masao Date: Fri, 20 Mar 2026 00:29:46 +0900 X-Gm-Features: AaiRm53d-YSIYQns0rS98pvXnR6fns-BVhlpWBOvTnOZ_6xPl87NxNJKJX6QhyI Message-ID: Subject: Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) To: Boris Mironov Cc: Madyshev Egor , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 12, 2026 at 11:28=E2=80=AFPM Boris Mironov wrote: > > Hi Egor, > > Thank you very much for your time reviewing this patch > and guiding through some of its inefficiencies. I like the idea of improving the performance of the initial data load in pgbench. That's definitely useful. I ran some tests on my MacBook (server and pgbench on the same machine) using different data loading options. Here are the results: ------------------------------------------------ [ Client / Text mode ] pgbench -i -Idtg -s100 done in 13.38 s (drop tables 0.00 s, create tables 0.01 s, client-side generate 13.38 s). pgbench -i -Idtg -s1000 done in 151.81 s (drop tables 0.00 s, create tables 0.01 s, client-side generate 151.81 s). [ Client / Binary mode ] pgbench -i -Idtc -s100 done in 18.32 s (drop tables 0.00 s, create tables 0.01 s, client-side generate 18.31 s). pgbench -i -Idtc -s1000 done in 204.48 s (drop tables 0.00 s, create tables 0.01 s, client-side generate 204.47 s). [ Server / generate_series ] pgbench -i -IdtG -s100 done in 21.30 s (drop tables 0.00 s, create tables 0.00 s, server-side generate 21.30 s). pgbench -i -IdtG -s1000 done in 230.94 s (drop tables 0.00 s, create tables 0.01 s, server-side generate 230.93 s). [ Server / Unnest ] pgbench -i -IdtU -s100 done in 23.16 s (drop tables 0.00 s, create tables 0.00 s, server-side generate 23.16 s). pgbench -i -IdtU -s1000 done in 249.08 s (drop tables 0.00 s, create tables 0.01 s, server-side generate 249.07 s). ------------------------------------------------ In my tests, text mode was faster than binary mode. Also, on the server sid= e, generate_series() was faster than unnest(). So I'm wondering if there are specific conditions where binary mode or unne= st() performs better. If not, it may not be worth supporting these additional da= ta loading options... Regards, --=20 Fujii Masao