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 1iaFIj-0004jn-Kw for pgsql-odbc@arkaria.postgresql.org; Thu, 28 Nov 2019 08:37:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iaFIh-0006lW-HT for pgsql-odbc@arkaria.postgresql.org; Thu, 28 Nov 2019 08:37:23 +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 1iaFIh-0006lP-71 for pgsql-odbc@lists.postgresql.org; Thu, 28 Nov 2019 08:37:23 +0000 Received: from webclient5.webclient5.de ([136.243.32.184]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iaFIZ-0006aq-TH for pgsql-odbc@lists.postgresql.org; Thu, 28 Nov 2019 08:37:21 +0000 Received: from [10.1.2.4] (unknown [94.101.37.79]) by webclient5.webclient5.de (Postfix) with ESMTPSA id 407C6558A30A for ; Thu, 28 Nov 2019 09:37:13 +0100 (CET) Subject: Re: about pgsql odbc insertion efficiency is very low To: pgsql-odbc@lists.postgresql.org References: From: Clemens Ladisch Message-ID: Date: Thu, 28 Nov 2019 09:37:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.101.4 at webclient5 X-Virus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk HIT . man wrote: > When I use remote PostgreSQL ODBC to insert 10 million pieces of data from the client to the server, the speed is 130 minutes. Are you using a prepared statement? How large are your transactions? The fastest way to bulk load data is with COPY, which is not supported in ODBC. To avoid network round trips, you could submit multi-row INSERT commands. Regards, Clemens