title: VERTICA insert multiple rows in one statement with named columns
body: <p>I want to insert multiple rows efficiently into VERTICA. In PostgreSQL (and probably other SQL implementations) it is possible to <code>INSERT</code> multiple rows in one statement, which is a lot faster, than doing single inserts (especially when in Autocommit mode).</p>
  
  <p>A minimal self-contained example to load two rows in a newly created table could look like this <strong>(a)</strong>:</p>
  
  <pre><code>CREATE TABLE my_schema.my_table (
  row_count int,
  some_float float,
  some_string varchar(8));
  
  INSERT INTO my_schema.my_table (row_count, some_float, some_string) 
  VALUES (1,1.0,'foo'),(2,2.0,'bar');
  </code></pre>
  
  <p>But the beauty of this is, that the order in which the values are bunched can be changed to be something like <strong>(b)</strong>:</p>
  
  <pre><code>INSERT INTO my_schema.my_table (some_float, some_string, row_count) 
  VALUES (1.0,'foo',1),(2.0,'bar',2); 
  </code></pre>
  
  <p>Furthermore, this syntax allows for leaving out columns which are then filled by default values (such as auto incrementing integers etc.).</p>
  
  <p>However, VERTICA does not seem to have the possibility to do a multi-row insert with the same fine-tuning. In fact, the only way to emulate a similar behaviour seems to be to <code>UNION</code> several selects together for something like <strong>(c)</strong>:</p>
  
  <pre><code>INSERT INTO my_schema.my_table SELECT 1,1.0,'foo' UNION SELECT 2,2.0,'bar';
  </code></pre>
  
  <p>as in this answer: <a href="https://stackoverflow.com/questions/37143786/vertica-sql-insert-multiple-rows-in-one-statement">Vertica SQL insert multiple rows in one statement</a> .</p>
  
  <p>However, this seems to be working only, when the order of the inserted columns matches the order of their initial definition. My question is, it is possible to craft a single insert like <strong>(c)</strong> but with the possibility of changing column order as in <strong>(b)</strong>? Or am I tackling the problem completely wrong? If so, what alternative is there to a multi-row insert? Should I try <code>COPY LOCAL</code>?</p>