i have 8 cpu. i am the only user.
create table p ( p int);
for i in 1..1000000 loop
insert into p values (i);
set timing on
create index myindex on p(p);
drop index myindex;
create index myindex on p(p) parallel(degree 4) nologging;
08-17-2001, 07:01 PM
Is the parallel option had been enabled on the server?
08-18-2001, 12:19 PM
I was thinking about this and here is a possible reason it is slower. The data most likely still resides within memory, so you take a hit for the overhead of having multiple servers trying to come together with a final results. Now, if you had a much larger set of information and it was primarily sitting on disk, it would be much faster parallel than serial. So, having multiple processes would speed up the build process by overcoming disk I/O.
08-18-2001, 08:17 PM
You may have underlying tuning issues that multiple processes just exagerates.
08-20-2001, 06:56 PM
Just a minor point, but DEGREE 4 is very small. Try upping it to 20 or 40.
08-21-2001, 09:09 PM
thank you all for reply.
however, it didn't help me out.
1. i don't think 1000000 is small .
2. what do i need to do in order to use parallel
anything need to setupt first?
3. since i only have 8 cpu, don't you think setup degree to 20 is too big( i tried 20 degree, it didn't speed things up).
[Edited by beginner on 08-21-2001 at 09:19 PM]
08-21-2001, 09:45 PM
Do you have I/O contention? My bet is that you are building the index in one tablespace that is getting pounded.
08-22-2001, 10:04 AM
Parallel and NOLOGGING are useful when you do bulk copy such as SQL*LOADER or IMPORT utilities.
If you are inserting a row using PL/SQL block, they won't be of much help.
08-22-2001, 10:06 AM
I think he/she is concerned about the index rebuild and not the insert.
08-22-2001, 12:59 PM
i did another test today.
create index myindex on p(p) takes 39.17
create index myindex on p(p) parallel(degree 8) nologging
while i do the test.
i opened another window
and issue iostat -xn 5
%b is less than 50 all the time.