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.
번호 제목 글쓴이 날짜 조회 수 추천 수
835 리눅스 새 하드 장착하기 RanomA 2021.12.01 600 0
834 리눅스 SSH Network error: Software caused connection abort RanomA 2021.05.29 2018 0
833 인터넷 기본 설정 복원 창 띄우는 방법들 file RanomA 2021.05.01 1024 0
832 리눅스 디렉토리별 압축 파일 생성 쉘 스크립트 RanomA 2021.04.04 831 0
831 Javascript 숫자에 끊어 읽기 컴마(,) 추가 RanomA 2020.11.27 752 0
830 Javascript 문자열을 포맷 맞춰 날짜로, 날짜를 포맷 맞춘 문자열로 변환 RanomA 2020.11.26 719 0
829 Javascript 날짜 더하기 RanomA 2020.11.26 451 0
828 Javascript 해당 연월의 마지막 날짜 가져오기 RanomA 2020.11.25 365 0
827 Javascript isNullOrEmpty RanomA 2020.11.25 686 0
826 Javascript 전화번호 포매팅 RanomA 2020.11.25 2309 0
825 Javascript IN RanomA 2020.11.18 261 0
824 Javascript LPAD RanomA 2020.11.17 582 0
823 Adobe Creative Cloud 업데이트 실패 184(혹은 C184) 오류 file RanomA 2020.09.08 1072 0
822 오라클 테이블 레이아웃 조회 Query RanomA 2020.01.13 2064 0
821 SQL Developer의 폰트 설정에서 폰트 목록이 안나타날 때 [6] file RanomA 2019.12.30 4875 0
820 Underscore( _ 문자)를 카멜 케이스(Camel Case)로 변환하기 RanomA 2019.12.06 1815 0
819 라이트룸(Adobe Lightroom) 한자/일본어용 폰트 변경 file RanomA 2018.06.06 2144 0
818 마녀의 빗자루와 악마와의 파티 RanomA 2018.03.23 891 0
817 크레인 안전 점검이 허술해진 게 이명박 때가 아니다? RanomA 2018.01.06 709 0
816 인도 중국의 분쟁 지역 file RanomA 2017.08.17 1295 0