Learning PostgreSql: bulk loading data

Posted by Alexander Kuznetsov on SQL Blog See other posts from SQL Blog or by Alexander Kuznetsov
Published on Mon, 04 Nov 2013 16:13:00 GMT Indexed on 2013/11/04 22:05 UTC
Read the original article Hit count: 451

Filed under:
|
In this post we shall start loading data in bulk. For better performance of inserts, we shall load data into a table without constraints and indexes. This sounds familiar. There is a bulk copy utility, and it is very easy to invoke from C#. The following code feeds the output from a T-SQL stored procedure into a PostgreSql table: using ( var pgTableTarget = new PgTableTarget ( PgConnString , "Data.MyPgTable" , GetColumns ())) using ( var conn = new SqlConnection ( connectionString )) { conn.Open...(read more)

© SQL Blog or respective owner

Related posts about Agile-learning

Related posts about postgresql