Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTQXf-0007A7-BF for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 12:40:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hTQXd-0002A5-HW for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2019 12:40:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTQXd-00029y-4L for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 12:40:21 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTQXa-00053A-Hr for pgsql-general@lists.postgresql.org; Wed, 22 May 2019 12:40:19 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 85C8C99387 for ; Wed, 22 May 2019 05:40:16 -0700 (PDT) Date: Wed, 22 May 2019 05:40:16 -0700 (PDT) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Bulk inserts into two (related) tables In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 22 May 2019, Francisco Olarte wrote: > I'm curious, what org_id do you put (manually) to the people? you must > have some way to match it ( like, say, "I have an organization line, > followed by lines for people in this organization" Francisco, The first data entered was in small chunks so I'd add a few rows to the organization table, output a file of org_id and org_name, then use the source data to associate that org_id to the people associated with it. With this new data source I want to populate the two tables more quickly. I think the time consuming part is associating people with their organization. I'll do more thinking about this. I don't do perl, though. Thanks, Rich