Bug 3745 - COPY BINARY doesn't support copy without auto-increment column
Summary: COPY BINARY doesn't support copy without auto-increment column
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: x86 (i?86) Linux
: Normal enhancement
Assignee: SQL devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-22 18:35 CEST by 357416268
Modified: 2016-04-11 11:45 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 357416268 2015-06-22 18:35:47 CEST
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
Build Identifier: 

If I COPY BINARY INTO a table which has a serial type primary key,
I can not use COPY BINARY INTO command directly to this table,
I must create a helper table without auto increment primary key, COPY BINARY INTO the helper table and then insert into the large table from the helper table.
but usually the last step is very time consuming.

Reproducible: Always

Steps to Reproduce:
1.create table uniquecatalogg(targetid int, ra_avg double, decl_avg double, flux_ref double, zone smallint, x double, y double, z double);
2.create sequence "unique_seq" as int;
3.create table uniquecatalog(id  int PRIMARY KEY DEFAULT NEXT VALUE FOR "unique_seq"
, targetid int, ra_avg double, decl_avg double, flux_ref double, datapoints int, one smallint, x double, y double, z double, INACTIVE BOOLEAN);
Actual Results:  
when I COPY BINARY 78GB binary data into monetdb, loading only takes 523.231 second, 
while the last INSERT INTO takes 576.388 second.

Expected Results:  
COPY BINARY INTO table (col1, col2, col3) FROM file1, file2, file3;
if the table has a auto increment column, the column grows in the background like what it does in
INSERT INTO command.