yunsh206

회원가입로그인

컴퓨터 Oracle Parallel FAQ

2003.12.26 16:02

RanomA 조회 수:1374

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.
번호 제목 글쓴이 날짜 조회 수 추천 수
183 리눅스 SSH Network error: Software caused connection abort RanomA 2021.05.29 2018 0
182 인터넷 기본 설정 복원 창 띄우는 방법들 file RanomA 2021.05.01 1025 0
181 리눅스 디렉토리별 압축 파일 생성 쉘 스크립트 RanomA 2021.04.04 831 0
180 Javascript 숫자에 끊어 읽기 컴마(,) 추가 RanomA 2020.11.27 752 0
179 Javascript 문자열을 포맷 맞춰 날짜로, 날짜를 포맷 맞춘 문자열로 변환 RanomA 2020.11.26 719 0
178 Javascript 날짜 더하기 RanomA 2020.11.26 451 0
177 Javascript 해당 연월의 마지막 날짜 가져오기 RanomA 2020.11.25 365 0
176 Javascript isNullOrEmpty RanomA 2020.11.25 686 0
175 Javascript 전화번호 포매팅 RanomA 2020.11.25 2309 0
174 Javascript IN RanomA 2020.11.18 261 0
173 Javascript LPAD RanomA 2020.11.17 582 0
172 Adobe Creative Cloud 업데이트 실패 184(혹은 C184) 오류 file RanomA 2020.09.08 1073 0
171 오라클 테이블 레이아웃 조회 Query RanomA 2020.01.13 2064 0
170 SQL Developer의 폰트 설정에서 폰트 목록이 안나타날 때 [6] file RanomA 2019.12.30 4877 0
169 Underscore( _ 문자)를 카멜 케이스(Camel Case)로 변환하기 RanomA 2019.12.06 1815 0
168 라이트룸(Adobe Lightroom) 한자/일본어용 폰트 변경 file RanomA 2018.06.06 2145 0
167 입력기(IME)에 EN - 영어(미국) 키보드 US 가 표시될 때 [1] file RanomA 2016.05.03 1456 0
166 Thunderbolt 3와 USB-C RanomA 2016.04.28 682 0
165 ATOK 단축키 설정을 했는데도 입력 모드 변경이 잘 안될 때 file RanomA 2016.04.21 503 0
164 ATOK 단축키 설정 file RanomA 2016.04.18 563 0