컴퓨터 Oracle Parallel FAQ
2003.12.26 16:02
What is Oracle Parallel Query?
Oracle Parallel Query (formerly Oracle Parallel Query Option or PQO) allows one to break-up a given SQL statement so that its parts can run simultaneously on different processors in a multi-processor machine. Typical operations that can run in parallel are: full table scans, sorts, sub-queries, data loading etc.
Parallel Query can improve performance of certain types of operations dramatically and is commonly used in Decision Support and Data Warehousing applications.
What is the difference between Parallel Query and Parallel Server?
Parallel Query allows one to break a SELECT or DML statements into multiple smaller chunks and have PQ slaves execute those smaller chunks on separate CPU's in a single box.
Oracle Real Application Clusters (RAC) allows one to take advantage of a multi-node clustered environment for availability and performance reasons. It is commonly used to access a very large database from different nodes of a cluster. More information about Oracle RAC can be obtained from the RAC FAQ.
If both RAC and OPQ are available one can split operations across multiple CPUs and multiple nodes in a cluster for even further performance improvements.
How does one invoke Parallel Query?
After setting the INIT.ORA parameters necessary for Parallel Query to work, do the following:
Alter the table (or index) to indicate that Oracle should try to parallelize operations performed against it
ALTER TABLE TAB_XXX PARALLEL (DEGREE 8);
Put hints in SQL statements to indicate that Oracle should try to execute them in parallel:
SELECT --+ PARALLEL(table_alias, degree, nodes) * FROM table ...
How does one disable Parallel Query?
Per table, execute the following DDL commands:
ALTER TABLE TAB_XXX PARALLEL (DEGREE 1 INSTANCES 1); or
ALTER TABLE TAB_XXX NOPARALLEL;
ALTER INDEX IND_XXX PARALLEL (DEGREE 1 INSTANCES 1); or
ALTER INDEX IND_XXX NOPARALLEL;
You can also remove the INIT.ORA parameters that allow Parallel Query to work.
What parameters can be set to control Parallel Query?
The following INIT.ORA initialization parameters can be set to control Parallel Query execution:
PARALLEL_MIN_SERVERS
PARALLEL_MAX_SERVERS
PARALLEL_AUTOMATIC_TUNING = TRUE
# enable intelligent defaults for parallel execution parameters (8i and above)
etc.
How does one monitor Parallel Query Execution?
Use the following Oracle data dictionary views to monitor parallel queries:
Prior to Oracle 8i:
select * from sys.v_$pq_sysstat;
Oracle 8i and above:
select * from v_$pq_sysstat;
select * from v_$px_process;
select * from v_$px_sesstat;
select * from v_$px_process_sysstat;
Can single-processor systems benefit from Parallel Query?
The more CPU's the bigger the benefit than can be obtained from Parallel Query. However, even a single-CPU system can benefit from it. The reason for this is that the system can continue processing a second thread while waiting for I/O completion on another thread.
Can Parallel Query operations cause performance problems?
If not carefully watched over, Parallel Query can completely saturate a machine. It is not difficult to bring some of the most powerful machines to their knees. One needs to carefully balance the number of people executing Parallel Query Operations and the degree of parallelism with the number of CPUs in the system.
Oracle Parallel Query (formerly Oracle Parallel Query Option or PQO) allows one to break-up a given SQL statement so that its parts can run simultaneously on different processors in a multi-processor machine. Typical operations that can run in parallel are: full table scans, sorts, sub-queries, data loading etc.
Parallel Query can improve performance of certain types of operations dramatically and is commonly used in Decision Support and Data Warehousing applications.
What is the difference between Parallel Query and Parallel Server?
Parallel Query allows one to break a SELECT or DML statements into multiple smaller chunks and have PQ slaves execute those smaller chunks on separate CPU's in a single box.
Oracle Real Application Clusters (RAC) allows one to take advantage of a multi-node clustered environment for availability and performance reasons. It is commonly used to access a very large database from different nodes of a cluster. More information about Oracle RAC can be obtained from the RAC FAQ.
If both RAC and OPQ are available one can split operations across multiple CPUs and multiple nodes in a cluster for even further performance improvements.
How does one invoke Parallel Query?
After setting the INIT.ORA parameters necessary for Parallel Query to work, do the following:
Alter the table (or index) to indicate that Oracle should try to parallelize operations performed against it
ALTER TABLE TAB_XXX PARALLEL (DEGREE 8);
Put hints in SQL statements to indicate that Oracle should try to execute them in parallel:
SELECT --+ PARALLEL(table_alias, degree, nodes) * FROM table ...
How does one disable Parallel Query?
Per table, execute the following DDL commands:
ALTER TABLE TAB_XXX PARALLEL (DEGREE 1 INSTANCES 1); or
ALTER TABLE TAB_XXX NOPARALLEL;
ALTER INDEX IND_XXX PARALLEL (DEGREE 1 INSTANCES 1); or
ALTER INDEX IND_XXX NOPARALLEL;
You can also remove the INIT.ORA parameters that allow Parallel Query to work.
What parameters can be set to control Parallel Query?
The following INIT.ORA initialization parameters can be set to control Parallel Query execution:
PARALLEL_MIN_SERVERS
PARALLEL_MAX_SERVERS
PARALLEL_AUTOMATIC_TUNING = TRUE
# enable intelligent defaults for parallel execution parameters (8i and above)
etc.
How does one monitor Parallel Query Execution?
Use the following Oracle data dictionary views to monitor parallel queries:
Prior to Oracle 8i:
select * from sys.v_$pq_sysstat;
Oracle 8i and above:
select * from v_$pq_sysstat;
select * from v_$px_process;
select * from v_$px_sesstat;
select * from v_$px_process_sysstat;
Can single-processor systems benefit from Parallel Query?
The more CPU's the bigger the benefit than can be obtained from Parallel Query. However, even a single-CPU system can benefit from it. The reason for this is that the system can continue processing a second thread while waiting for I/O completion on another thread.
Can Parallel Query operations cause performance problems?
If not carefully watched over, Parallel Query can completely saturate a machine. It is not difficult to bring some of the most powerful machines to their knees. One needs to carefully balance the number of people executing Parallel Query Operations and the degree of parallelism with the number of CPUs in the system.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 | 추천 수 |
|---|---|---|---|---|---|
| 835 | 예송논쟁 | RanomA | 2003.01.14 | 3938 | 0 |
| 834 | 갑자사화와 연산군식의 개혁 | RanomA | 2003.01.14 | 2297 | 0 |
| 833 | 이인화와 영원한 제국 | RanomA | 2003.01.14 | 1636 | 0 |
| 832 |
이상한 신문...
| RanomA | 2003.01.14 | 1023 | 10 |
| 831 | 필요한 건 상상력과 꼼꼼함... 그리고 긴 호흡... | RanomA | 2003.02.02 | 1249 | 0 |
| 830 | 일단 1권 다 읽었음... | RanomA | 2003.02.03 | 1398 | 0 |
| 829 | 추가로 영화와 책의 차이점. | RanomA | 2003.02.04 | 1327 | 0 |
| 828 | 성종이 어우동에게 느꼈던 분노감 | RanomA | 2003.02.11 | 2450 | 0 |
| 827 | 비둘기 가족을 부른 이석이라는 사람... | RanomA | 2003.02.16 | 1571 | 0 |
| 826 | 대한민국의 맘에 안드는 점 하나... | RanomA | 2003.02.19 | 1284 | 0 |
| 825 | 저는 오늘 꽃을 받았어요. [3] | RanomA | 2003.02.23 | 1516 | 0 |
| 824 | 난방보다 냉방이 어려운 이유... | RanomA | 2003.02.24 | 1911 | 0 |
| 823 | 그들이 하고픈 말은... [1] | RanomA | 2003.03.04 | 1210 | 0 |
| 822 | 제로보드와 내 홈피 게시판의 차이... | RanomA | 2003.03.09 | 2271 | 0 |
| 821 |
자료실의 첨부파일 개수가 무한대로...
| RanomA | 2003.03.26 | 1157 | 0 |
| 820 | MySQL 백업관련 명령어 몇 개 | RanomA | 2003.03.28 | 1123 | 0 |
| 819 |
MySQL 매뉴얼
| RanomA | 2003.03.28 | 936 | 14 |
| 818 |
Informix FAQ for Monitor, Tune, Support
| RanomA | 2003.04.08 | 926 | 11 |
| 817 | '근로자의 날'보다는 '노동절'이라고 칭합시다. | RanomA | 2003.04.29 | 981 | 0 |
| 816 | 나이수~~~ 유시민~~~ [2] | RanomA | 2003.04.29 | 1047 | 0 |






