public inbox for [email protected]  
help / color / mirror / Atom feed
From: Muhammad Malik <[email protected]>
To: Andres Freund <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Melanie Plageman <[email protected]>
Cc: Yura Sokolov <[email protected]>
Cc: Robert Haas <[email protected]>
Subject: Re: refactoring relation extension and BufferAlloc(), faster COPY
Date: Wed, 3 May 2023 19:29:46 +0000
Message-ID: <SJ0PR17MB58412FDEE3DCAC0C23C062ABA66C9@SJ0PR17MB5841.namprd17.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<SJ0PR17MB5841FC5FE92FBF6FA76EA07BA66C9@SJ0PR17MB5841.namprd17.prod.outlook.com>
	<[email protected]>


> I use a script like:

> c=16;psql -c 'DROP TABLE IF EXISTS copytest_0; CREATE TABLE copytest_0(data text not null);' && time /srv/dev/build/m-opt/src/bin/pgbench/pgbench -n -P1 -c$c -j$c -t$((1024/$c)) -f ~/tmp/copy.sql && psql -c 'TRUNCATE copytest_0'

> >[1] COPY (SELECT repeat(random()::text, 5) FROM generate_series(1, 100000)) TO '/tmp/copytest_data_text.copy' WITH (FORMAT test);
> >[2] COPY (SELECT repeat(random()::text, 5) FROM generate_series(1, 6*100000)) TO '/tmp/copytest_data_text.copy' WITH (FORMAT text);

When I ran this script it did not insert anything into the copytest_0 table. It only generated a single copytest_data_text.copy file of size 9.236MB.
Please help me understand how is this 'pgbench running COPY into a single table'. Also what are the 'seconds' and 'tbl-MBs' metrics that were reported.

Thank you,
Muhammad




view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: refactoring relation extension and BufferAlloc(), faster COPY
  In-Reply-To: <SJ0PR17MB58412FDEE3DCAC0C23C062ABA66C9@SJ0PR17MB5841.namprd17.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox