Parallel Hint in Oracle

I will explain Parallel Hint in Oracle in this post.

 

Parallel Hint

If you execute any SQL which is accessing large data sets, then you may use Parallel hint to perform it in parallel.

When you use parallel hint, you should check operating system CPU counts and cores to specify how many parallel will you use it.

 

 

 

 

If lots of people use parallel hint everytime, operating system and database can  slow down or power off because of CPU bootleneck.

 

 

 

Parallel hint for Oracle large data access

 

Parallel hint syntax is as follows.

/*+ PARALLEL (table_name[, degree[, instances]]) */

 

You can use the Parallel hint to force parallel running the SQL Statement

SELECT /*+ PARALLEL(employees 8) */ e.last_name
FROM   employees e
WHERE  department_id=63;



SELECT /*+ PARALLEL(96) */ COUNT(*) 
FROM TABLE_NAME;


 

You can alter degree of table with parallel or noparallel as follows.

ALTER TABLE TABLE_NAME PARALLEL 64;
ALTER TABLE TABLE_NAME NOPARALLEL;

 

 

 

You can run the following script to parallelize the session using the following script.

ALTER SESSION ENABLE PARALLEL DML;
ALTER SESSION FORCE PARALLEL;
alter session force parallel query parallel 32;
ALTER SESSION FORCE PARALLEL DML parallel 32;

 

 

You can review the following post to learn more details about Oracle Hint usage.

What is the Optimizer Hints and How to Use Hints in Oracle | Oracle Database Performance Tuning Tutorial -16

 

 

 

 

 

Do you want to learn Oracle Database Performance Tuning detailed, then read the following articles.

Performance Tuning and SQL Tuning Tutorial in the Oracle Database

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *