Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1froJA-0004cw-S7 for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 17:49:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1froJ8-0002RP-VK for pgsql-general@arkaria.postgresql.org; Mon, 20 Aug 2018 17:49:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1froJ8-0002Q9-HR for pgsql-general@lists.postgresql.org; Mon, 20 Aug 2018 17:49:38 +0000 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1froJ4-0007dh-C6 for pgsql-general@lists.postgresql.org; Mon, 20 Aug 2018 17:49:37 +0000 Received: by mail-oi0-x243.google.com with SMTP id k12-v6so27291944oiw.8 for ; Mon, 20 Aug 2018 10:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=FFfsds8row7CvLN04NQJcjGuBCQBZqNKSfHMfj0Lubo=; b=oIrO7iYHk/Z4cLjuLXN5RKSJWcilvCJ/iNpygiEbCYs3xQbwel24aVzXPRzG/QGgBS BO6ScdJJFiuRWwCGE4iX5v6hU2+tMrzPlx3K77heAqNDmext7EIajBk6PfxaNv03Lnsj kdiiQDe/+Gje8meGfHFc32ldbVdT7bEg39fNwidlfdXvKY1i2r5fvhwzhB/5aesS2rRQ Qy4Sc2/WuFWNhmtcRDIn25PqL5k3uEnYgQvNUbzORs6oEC2tumwbDoX/xMfs4sySeSRf d0u/qqJl0xwLAZ22DX+6jV210UHZYi40B+B4qCt/tFFMUWi1DVcrY6anVcfoPG4jvzBj oPPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=FFfsds8row7CvLN04NQJcjGuBCQBZqNKSfHMfj0Lubo=; b=CBqJ/HSu1aLJo2uPyL6t9NayS3KxsIEEMXV+OkWMai5JTyVoyh1XvJmWKOdCDA4S4D gs81X4WvlpDKZS2fs99hrtnPv3lOb8Bxp5B50JNMYESmJJH89B9Wbl6zjfHCbOqzfHZ4 YO/xU6Xqj8rzcvCZjygfaMZgFsB3v6H6TnN8HSfZKJ6unNagUjeZpuQxDehVrVsfMxZW DtD/BrcqTxea9hwvaDpXRtUe8e7ZtMRAPpuTVApPgPFDqXC/FlddafEl3dZcIoj5u679 kcwZaSCFRnYw0vo164Wyir436UWqF/fcLtX+UpQIhG8Ikomepv0kL26KcX1TSg/Ac4hu PFpA== X-Gm-Message-State: AOUpUlGW24A0U/gcrQC+enEjuUiiVQc3S+DX1ia1tzIzLT4pc1BhjbZp K4JgQH1/fyZUaVEJuiNbmOrbO2Nr X-Google-Smtp-Source: AA+uWPwAqyL0yGWKkPjYDf/dNxqffJVoWnW4EOAEpFGxWFEKw3bZoPNw8tcz3qIDAkIfc16q801F2Q== X-Received: by 2002:aca:3357:: with SMTP id z84-v6mr13904126oiz.49.1534787373358; Mon, 20 Aug 2018 10:49:33 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id p132-v6sm14002399oia.31.2018.08.20.10.49.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 10:49:32 -0700 (PDT) Subject: Re: [External] Multiple COPY on the same table To: pgsql-general@lists.postgresql.org References: <1497638817.10129815.1534776875333.ref@mail.yahoo.com> <1497638817.10129815.1534776875333@mail.yahoo.com> From: Ron Message-ID: <6c621687-64ad-7898-2628-3e9f4412df7f@gmail.com> Date: Mon, 20 Aug 2018 12:49:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0D41AD311FA0371D2D098AF3" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0D41AD311FA0371D2D098AF3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Maybe he just has a large file that needs to be loaded into a table... On 08/20/2018 11:47 AM, Vijaykumar Jain wrote: > Hey Ravi, > > What is the goal you are trying to achieve here. > To make pgdump/restore faster? > To make replication faster? > To make backup faster ? > > Also no matter how small you split the files into, if network is your > bottleneck then I am not sure you can attain n times the benefit my simply > sending the files in parallel but yeah maybe some benefit. > But then for parallel processing you also need to ensure your server is > having relevant resources or else it will just be a lot of context > switching I guess ? > Pg dump has an option to dump in parallel > pgbasebackup is single threaded I read but pgbackrest can allow better > parallel processing in backups. > There is also logical replication where you can selectively replicate your > tables to avoid bandwidth issues. > I might have said a lot and nothing may be relevant, but you need to let > us know the goal you want to achieve :) > > Regards, > Vijay > ---------------------------------------------------------------------------- > *From:* Ravi Krishna > *Sent:* Monday, August 20, 2018 8:24:35 PM > *To:* pgsql-general@lists.postgresql.org > *Subject:* [External] Multiple COPY on the same table > Can I split a large file into multiple files and then run copy using each > file.  The table does not contain any > serial or sequence column which may need serialization. Let us say I split > a large file to 4 files.  Will the > performance boost by close to 4x?? > > ps: Pls ignore my previous post which was without a subject (due to mistake) -- Angular momentum makes the world go 'round. --------------0D41AD311FA0371D2D098AF3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Maybe he just has a large file that needs to be loaded into a table...

On 08/20/2018 11:47 AM, Vijaykumar Jain wrote:
Hey Ravi,

What is the goal you are trying to achieve here.
To make pgdump/restore faster?
To make replication faster?
To make backup faster ?

Also no matter how small you split the files into, if network is your bottleneck then I am not sure you can attain n times the benefit my simply sending the files in parallel but yeah maybe some benefit.
But then for parallel processing you also need to ensure your server is having relevant resources or else it will just be a lot of context switching I guess ?
Pg dump has an option to dump in parallel
pgbasebackup is single threaded I read but pgbackrest can allow better parallel processing in backups.
There is also logical replication where you can selectively replicate your tables to avoid bandwidth issues.
I might have said a lot and nothing may be relevant, but you need to let us know the goal you want to achieve :)

Regards,
Vijay
From: Ravi Krishna <sravikrishna@aol.com>
Sent: Monday, August 20, 2018 8:24:35 PM
To: pgsql-general@lists.postgresql.org
Subject: [External] Multiple COPY on the same table
 
Can I split a large file into multiple files and then run copy using each file.  The table does not contain any 
serial or sequence column which may need serialization. Let us say I split a large file to 4 files.  Will the
performance boost by close to 4x??

ps: Pls ignore my previous post which was without a subject (due to mistake)

--
Angular momentum makes the world go 'round.
--------------0D41AD311FA0371D2D098AF3--