Tag: sql

ORA_HASH and LOBs …. not nice partners

Consider the following simple setup SQL> create table t ( x int, b blob ); Table created. SQL> declare 2 bin blob; 3 begin 4 insert into t values (1, empty_blob()) 5 returning b into bin; 6 7 dbms_lob.writeappend(bin,10000,utl_raw.cast_to_raw(rpad(‘x’,10000,’x’))); 8 commit; 9 end; 10…

MERGE – concise syntax but not always fastest

A long time ago … a long long time ago (http://www.oracledba.co.uk/tips/merge_speed.htm) I wrote that MERGE works best over update and insert. This still holds true, but its also apparent that MERGE seems to be optimized for larger sets of rows. When you take it…