PARALLEL hint allows to create multiple slaves process in the background to perform the single task.
To completely read a table, optimizer uses FULL table scans.
By Using PARALLEL hint in case of FULL table scans we will get better query performance.
Check for the number of CPU's available for your DB instance using the following
select value from
v$parameter
where name = 'cpu_count'
say output is 4
Example:
Create a table
create table parallel_test (id number, des varchar2(100));
insert sample data
insert into parallel_test (select level, 'desc-'|| level from dual connect by level <=500000);
commit;
Now if you compare the explain plans shown in the below image we can see the performance difference with and with out PARALLEL hint
To completely read a table, optimizer uses FULL table scans.
By Using PARALLEL hint in case of FULL table scans we will get better query performance.
Check for the number of CPU's available for your DB instance using the following
select value from
v$parameter
where name = 'cpu_count'
say output is 4
Example:
Create a table
create table parallel_test (id number, des varchar2(100));
insert sample data
insert into parallel_test (select level, 'desc-'|| level from dual connect by level <=500000);
commit;
Now if you compare the explain plans shown in the below image we can see the performance difference with and with out PARALLEL hint
No comments:
Post a Comment