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 1hB2Vk-0008Oa-1i for pgsql-general@arkaria.postgresql.org; Mon, 01 Apr 2019 19:22:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hB2Vi-000750-Pr for pgsql-general@arkaria.postgresql.org; Mon, 01 Apr 2019 19:22:22 +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 1hB2Vi-00074s-CZ for pgsql-general@lists.postgresql.org; Mon, 01 Apr 2019 19:22:22 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hB2Vg-0003KX-1i for pgsql-general@lists.postgresql.org; Mon, 01 Apr 2019 19:22:21 +0000 Received: by mail-ot1-x32c.google.com with SMTP id j10so9819213otq.0 for ; Mon, 01 Apr 2019 12:22:19 -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-transfer-encoding:content-language; bh=RqGoWy5cytsYU4ivbZuNyYchetd31k7kgR6luAk5iis=; b=S1q4sLnItZnMw4Jextd4MECZBFae28UinUlC3SXqgfNrJhibYd7y8O5nOvhg07B0Y6 zU4fu7w32JVgc4ZDlC7F0CH6sOTuaPyvBHcNTYgG7oml6d3QwnGt0xf+qz5PHJ5cy/nP Vtthgh+p5RM5VEoD2cP3tbRp6k5ZzC3H4lRh/46g/aLDPLZZvFSqdVHlEfKPpgz7Rltx +LvcfUUlHXajVsdp05yjMfGS8pqDEe6qYnWrv7tTmjG+wd5td8EWpgyWmD3scAs5rBuN aOZy9yitdl644OF03eQz8KvGJNLJzEit/QLnES6wq5URZVoHQPGZvunn+x0azE9l3lrz /nYQ== 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-transfer-encoding :content-language; bh=RqGoWy5cytsYU4ivbZuNyYchetd31k7kgR6luAk5iis=; b=heug1hWrLVXJjeoisXX2q15XB8zG4cDMpqO0OClGNgHYByEAKJP2hKyfguPy1j+vKb R/dHufCHLGoag5H4k/EW/sG2UlXTvpin5CsnCV0NrS6yxsPDsa14NBu50zByZugsYZ3m qy7t/NqDR7SfoguMSHmikUL2PRrlvq1G0NepYqb+RU593p4B2W4z2Y101/cL21LvVKgr Srm65b8/wf/PQNYiunlVxN2xHLX7O9F2Jf5yLyF+yUXpLTrzGMpPgZIHCon2dBgp95YS zWujS96ASvF90ZCUN1GNwyRYjzPIXWxk1FrFThNyTzt3pdSWfZ4mjO/op8rc8nrVHYjC KWfQ== X-Gm-Message-State: APjAAAVVkI1qXB6YT+MS7sNjRf7ZAAWqdUBjzcFZHYSILwU68WXrBG0h OZ7YiVLv/G/0kDsCdu4j/8uaNZ2PVCU= X-Google-Smtp-Source: APXvYqwRDKXSe8gH5mAalhXSIrl2uP6+FW9fWQ5lFvq2DCdfoOXduSIQAcZSF85AgFIK2SeAg8A6Rg== X-Received: by 2002:a9d:694c:: with SMTP id p12mr1949842oto.242.1554146539327; Mon, 01 Apr 2019 12:22:19 -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 r25sm4369212otk.37.2019.04.01.12.22.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 12:22:18 -0700 (PDT) Subject: Re: Help with insert query To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Mon, 1 Apr 2019 14:22:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/1/19 12:37 PM, Glenn Schultz wrote: > All, > > The query below is designed to insert into a table.  This works when I > have a single loan which I insert. However, if remove the part of the > where clause of a single loan the insert does not work.  The table fnmloan > is a large table with 500mm + rows and the query runs for about 4 hours. > Any idea of how to get this to work?  I am a little stumped since the > query works with one loan. Following up to Michael's answer... 500MM rows in 4 hours is an insert rate of 34,722.222... records per second. -- Angular momentum makes the world go 'round.