Wednesday, February 4, 2009
Speed up Data Load
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
To accelerate processing, for example for quick data load or improved query you might try this:
- Put your table in parallel mode.
the operation run in parallel also this suggest your Hardware has multiple cpu for example 4 CPU's.
For this sample the chosen table name is CAR:
create table car(
car_id char(4),
make varchar2(18),
year char(4),
price number)
parallel 4;
alter table car
add constraint xpkcar primary key (car_id);
this just create the primary key. in compatible sql,
In Oracle sqlplus syntax you might just write:
--
create table car(
car_id char(4) primary key,
make varchar2(18),
year char(4),
price number)
parallel 4;
Or if the table is already created just alter it.
SQL> alter table CAR parallel 4;
SQL> alter session enable parallel DML;
DML is for Data manipulation such as insert, update, delete , if you are creating lots of object substitue DML by DDL.
SQL> alter session enable parallel DDL;
You might also force it.
SQL> alter session force parallel DDL;
I read somewhere that insert with syntax of insert into table values (A,B,C,..) does not work on parallel so I will check on it and will eventually post it.
You also might use hint such as
insert /*+ parallel (CAR) */
--
--
Need Oracle consultant contact us at service@jaffrayconsulting.com
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment