Parallel Oracle operations

Source: Internet
Author: User

Parallel Processing generally involves disk access. If data is not distributed across multiple disks, using PEO will cause I/O bottlenecks. Using parallel operations in small tables or very fast queries reduces performance.

When the degree of parallelism is set to n, a total of (2 * n) + 1 processes are required for parallel operations.

When creating a table, you can specify the degree of parallelism that the table can use. DOP (degree of parallelism ):

Create Table Test (
Testid number (12) not null,
Testdate date
) Parallel 4;

When the execution of the table test query does not execute parallelism for the query, Oracle uses 4 as the default value of parallelism. You can specify a new value for parallel during query: Select/* + parallel (test, 6) */* from test;

You can also disable parallel operations in a given query on a table: Select/* + no_parallel (TEST) */* from test;

If the parallel prompt is used but the prompt is not displayed or the DOP is set in the table, the query is still processed in parallel, but the DOP is calculated by the initialization parameters cpu_count and parallel_threads_per_cpu.

Alter table test parallel (degree 4 );

When parallel query is run, it is easy for the machine to run at a high load, which makes the system process other transactions much longer. parallel query is generally suitable for manual execution at non-business peak values, and is not suitable for specifying parallel queries in programs.

Make sure that the commit or rollback operation is performed after the parallel DML statement is used. Otherwise, an error occurs when you execute the select operation immediately after the parallel DML statement on the same table.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.