Sunday, November 8, 2015

1.11 What are the 3 COPY Load Methods : AUTO, TRICKLE and DIRECT

What are the 3 COPY Load Methods : AUTO, TRICKLE and DIRECT

COPY Statement can load using any of the following load methods.
We should to specify the LOAD method as the OPTION for the COPY statement.
Default is AUTO(in case we dont specify anything).

AUTO
Default.
Used when we dont specify a load option.

COPY uses the AUTO method to load data into WOS (Write Optimized Store in memory).
Once WOS is full, COPY continues loading directly to ROS (Read Optimized Store on disk) containers. 
DIRECT
Use the DIRECT parameter to to load data directly into ROS containers, bypassing loading data into WOS.

The DIRECT option is best suited for large data loads
TRICKLE
(incremental)
Trickle loading loads data into the WOS.

If the WOS becomes full, an error occurs and the entire data load is rolled back.

Use this option only when you have a finely-tuned load and moveout process at your site, and you are confident that the WOS can hold the data you are loading. This option is more efficient than AUTO when loading data into partitioned tables.


echo 'JEFFERY|23|2016-02-01|20010' | vsql -U sukul1 -w xxxxxxxx -h gone077.xxxx.lll.com -c "COPY USER_30_DAY_TABLES.EMPLOYEE_1 ( NAME,AGE,JOINING_DATE FILLER VARCHAR(10),JOINING_YEAR AS TO_NUMBER(TO_CHAR(TO_DATE(JOINING_DATE,'YYYY-MM-DD'),'YYYY')),SALARY) FROM STDIN DELIMITER '|' ABORT ON ERROR TRICKLE;

No comments:

Post a Comment