Write Large Data Updates Directly to Disk

By default, all data updates are passed through an in-memory store first. However, the capacity of this memory store is limited. It is more efficient to direct large bulk data uploads or modifications directly into disk.

Do this by using the DIRECT keyword in the COPY command and the /+direct/ hint in INSERT, DELETE, and MERGE commands.

Examples:

COPY table FROM LOCAL 'file.csv'
ABORT ON ERROR DIRECT;

MERGE /*+direct*/ INTO opportunities t
     USING in_opportunities s
        ON s.id = t.id
  WHEN MATCHED THEN
    UPDATE SET name      = s.name,
               created   = s.created,
               closed    = s.closed,
               stage     = s.stage,
               is_closed = s.is_closed,
               is_won    = s.is_won,
               amount    = s.amount
  WHEN NOT MATCHED THEN
    INSERT
      (id, name, created, closed, stage, is_closed, is_won, amount)
      VALUES
        (s.id, s.name, s.created, s.closed, s.stage, s.is_closed, s.is_won, s.amount);