Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5ZEI-0007oa-OG for pgsql-general@arkaria.postgresql.org; Mon, 09 Apr 2018 16:01:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5ZEH-0006zk-IL for pgsql-general@arkaria.postgresql.org; Mon, 09 Apr 2018 16:01:13 +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 1f5ZEH-0006za-6t for pgsql-general@lists.postgresql.org; Mon, 09 Apr 2018 16:01:13 +0000 Received: from mail.wordtothewise.com ([2001:470:1:6d::9a]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5ZED-0003Lu-V3 for pgsql-general@postgresql.org; Mon, 09 Apr 2018 16:01:12 +0000 Received: from satsuke.wordtothewise.com (204.11.227.194.static.etheric.net [204.11.227.194]) by mail.wordtothewise.com (Postfix) with ESMTPSA id 1F3A723379 for ; Mon, 9 Apr 2018 09:02:04 -0700 (PDT) From: Steve Atkins Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: best way to write large data-streams quickly? Date: Mon, 9 Apr 2018 09:01:08 -0700 References: To: Postgres General In-Reply-To: Message-Id: <1137E1BF-BEEE-4EB9-B284-2AC923C2A016@blighty.com> X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Apr 9, 2018, at 8:49 AM, Mark Moellering = wrote: >=20 > Everyone, >=20 > We are trying to architect a new system, which will have to take = several large datastreams (total of ~200,000 parsed files per second) = and place them in a database. I am trying to figure out the best way to = import that sort of data into Postgres. =20 >=20 > I keep thinking i can't be the first to have this problem and there = are common solutions but I can't find any. Does anyone know of some = sort method, third party program, etc, that can accept data from a = number of different sources, and push it into Postgres as fast as = possible? Take a look at http://ossc-db.github.io/pg_bulkload/index.html. Check = the benchmarks for different situations compared to COPY. Depending on what you're doing using custom code to parse your data and = then do multiple binary COPYs in parallel may be better. Cheers, Steve