Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Vikas .

Asked: December 24, 2005 - 1:13 am UTC

Last updated: December 24, 2005 - 12:32 pm UTC

Version: 10.1.2

Viewed 1000+ times

You Asked

Hi Tom,

I need to know how the external tools like SQLLDR,import,export can be tkprofed. I have some processes which are not performant enough as we need to scale and load in near future.

Can you please demonstrate it with an example. Also can you please let me know how the bulk processing can be achieved while loading the data, as I have read it to be more faster, is it the same as direct = true option.

Regards,
Vikas

and Tom said...

to trace tools like that, I typically use a trigger like this:


create or replace trigger logon_trigger
after logon on schema
begin
execute immediate
'alter session set events ''10046 trace name context forever, level 12'' ';
end;
/

(note: you have to have ALTER SESSION granted to you for this to work)

put that into the schema that is going to run the tool, start running the tool and then drop the trigger. There are other methods, but this gets the entire session (you could for example start the tool - query v$session for the sid, serial# and use dbms_system to set sql trace in session as well)


sqlldr - bulk loads by default, set bindsize to be the size of the bind buffer and it array inserts.

import does the same.


but array processing is *not* direct pathing - direct path operations are those that write directly to the Oracle datafiles. sqlldr can do it, imp cannot (but impdp = the data pump - can)

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thanks

vikas, December 24, 2005 - 10:49 am UTC

Thanks Tom for the answer!

Just a quick clarification regarding the bind size, I hope the default for this value is 64K, should we increase this value to a larger value for the SQLLDR to perform efficiently.

Is it a better and more performant option than direct=true

Thanks
Vikas

Tom Kyte
December 24, 2005 - 12:32 pm UTC

you cannot compare direct=true with conventional path inserts so easily. There are restrictions on direct=true, they do very different things.


You would benchmark various buffer settings with your data in your environment to see which performs "best". A buffer that can hold between 100 and 500 rows typically.

Another option for other tools...

J. Laurindo Chiappa, December 25, 2005 - 9:34 am UTC

Going back to the topic : for some other external tools (like exp & imp) you can use the TRACE=Y switch (ref : metalink note 271782.1 Subject: Trace option in Export and Import). Undocumented and unsuported, but works for now...

Regards,

Chiappa

More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.