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 1rVO5m-00GbsY-RK for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Feb 2024 03:50:23 +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 1rVO5k-000rrE-7z for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Feb 2024 03:50:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVO5j-000rr6-0h for pgsql-hackers@lists.postgresql.org; Thu, 01 Feb 2024 03:50:19 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVO5f-004R5E-QN for pgsql-hackers@postgresql.org; Thu, 01 Feb 2024 03:50:17 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 667983200B23; Wed, 31 Jan 2024 22:50:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 31 Jan 2024 22:50:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1706759412; x=1706845812; bh=SkCs76oiPr iBuyDFC7zVcxDUEWoJTRN5zi43SqxQKKE=; b=lFpX1Er9uP2FTlPh92v4vbLc14 R5rJcXRsTEo1d7lytMYce5vYrTwoVSMu22EL+EZiwtBxGgpVL0h2onPRUciX7zkz nM+SkcyyoR4inu8U+GreSsYkOSYcmUbHtwLpwP9WVzJMBSsgPKFc89nNCJLI7e+l 9uKkScyRGfVdZusC8XyMDdAKhhrkySs+x40wz3ZwQ0IREEEDKcGbKPZ+jZjMK1CU BQJIwV5DbYMqKqZW64RQ1vN9EZI580r2OM+pIgVmlVOaSCOZe6lRhvttkmLKoNi6 2xNPsOf+RNwGfWdjVpVa4SgH0qSQ+On/RvlzvqBJPCb5J8HbFERPbbsG2x3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706759412; x=1706845812; bh=SkCs76oiPriBuyDFC7zVcxDUEWoJ TRN5zi43SqxQKKE=; b=W5MuiGBehNfhpG05LJfv9LqRZx5poXmSBeTY5Dm6zmXS l+RVLcDIwEB5cgkSLHeNtmFH7ZHhSbtawV6kqhecU/xsRDglC62ly8XPpM+denjb Tgo1BLsEQwkcO1dfMy0DYzzhSiUBS9aNBIZUGvwwfFc6U218fyZ5BWrdhEKeGjvc FBY+uFpD6UemX6khyMlZktB3NdV0cmo7iwAHjF6ExblzdcvCBvCBbUxwpv4L7ST9 V98tQbWQYGxcIaeRkKym7Y9P9TjBqPQcLNDW27y99BcCJhpOS1qA5//8plVyQ4I4 CSX9MXwyRiorvkhJ4HdrNoDA+0NbV7kMQzQ8YnGRpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedutddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jan 2024 22:50:09 -0500 (EST) Date: Thu, 1 Feb 2024 12:49:59 +0900 From: Michael Paquier To: Sutou Kouhei Cc: sawada.mshk@gmail.com, zhjwpku@gmail.com, andrew@dunslane.net, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Make COPY format extendable: Extract COPY TO format implementations Message-ID: References: <20240130.171511.2014195814665030502.kou@clear-code.com> <20240131.141122.279551156957581322.kou@clear-code.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DdknzyKB5K/ZWqv8" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --DdknzyKB5K/ZWqv8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 01, 2024 at 10:57:58AM +0900, Michael Paquier wrote: > And here are the results I get for text and binary (ms, average of 15 > queries after discarding the three highest and three lowest values): > test | master | v7 | v10 =20 > -----------------+--------+------+------ > from_bin_1col | 1575 | 1546 | 1575 > from_bin_10col | 5364 | 5208 | 5230 > from_text_1col | 1690 | 1715 | 1684 > from_text_10col | 4875 | 4793 | 4757 > to_bin_1col | 1717 | 1730 | 1731 > to_bin_10col | 7728 | 7707 | 7513 > to_text_1col | 1710 | 1730 | 1698 > to_text_10col | 5998 | 5960 | 5987 Here are some numbers from a second local machine: test | master | v7 | v10 =20 -----------------+--------+------+------ from_bin_1col | 508 | 467 | 461 from_bin_10col | 2192 | 2083 | 2098 from_text_1col | 510 | 499 | 517 from_text_10col | 1970 | 1678 | 1654 to_bin_1col | 575 | 577 | 573 to_bin_10col | 2680 | 2678 | 2722 to_text_1col | 516 | 506 | 527 to_text_10col | 2250 | 2245 | 2235 This is confirming a speedup with COPY FROM for both text and binary, with more impact with a larger number of attributes. That's harder to conclude about COPY TO in both cases, but at least I'm not seeing any regression even with some variance caused by what looks like noise. We need more numbers from more people. Sutou-san or Sawada-san, or any volunteers? -- Michael --DdknzyKB5K/ZWqv8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmW7FOcACgkQnvQgOdby QH0e1g//YUgZpoLeI0miAnoL+K+XoHLwEvC2t9hbu9IeFyh2VBVu739m6/FKMsy8 wlGnBtGM9a36soAqKyMUgg+4DWRIwFQ+HrTCVr4SgjX/uTl7ydymMsbH+wpYUoE9 unonLn8AkZHdbWjD8GgaE1sRFOKoUGbqxs+h3xJoZ4jOi/VLyizxnAiLPWvhobfA sXb0djYp4AHnR6oLLp+6AjadugdDDBhQrhQf4RgkXuhxR2mswVQ/4uE32yJIWk6K Q98OKej9+VeOlxLXyYvCje/B+HvK7C8E2X0kV/4M60SfW2Q+t9sPPddEXfQKGNCK sjxT+FnBeHrIp+mV5ExL9tXoWrGYfbvkAeK/Lzf9tERwiXGzt/qVRJq91BUX9vve ytx6wjpZpJsrLWoinqxCKIJIiAjyCLeeMTN22exwkGaEtibwppBBUMbd5BWmc9zM 8CKecU09lx5YHTJlT0J0mcHOsfxr3iyzSsjJ4F2XBNc4wfHfPtwJAnWmJ2Kcjo/B LTuTU+Aclfwz3cXIY++DVtnElHacXMJxeoXBfsPa3Yubfo97Q6yqIEGRe2UC3K9S sZGUY9z0I4GNx/ybcA7xa/4NVTFg8t2KUPjGSu9rnsQqmm7AXpGZJ1LUJd/KE1u8 yy0ep+k3jmoojpF1KccY/Jwa+Y4Hu7jc9Ad8D7utwsycJn5hKWE= =Ht5z -----END PGP SIGNATURE----- --DdknzyKB5K/ZWqv8--