哪些場景可以使用并行度 table scan、fast full index scans、partition index range scans(僅限local索引) create table as、create index、rebuild index、move、split、DML(insert\update\delete)
PARALLEL_FORCE_LOCAL controls parallel execution in an Oracle RAC environment. By default, the parallel server processes selected to execute a SQL statement can operate on any or all Oracle RAC nodes in the cluster. By setting PARALLEL_FORCE_LOCAL to true, the parallel server processes are restricted so that they can only operate on the same Oracle RAC node where the query coordinator resides (the node on which the SQL statement was executed on). 控制Oracle RAC環境中的并行執行。默認情況下,選擇執行SQL語句的并行服務器進程可以在群集中的任何或所有Oracle RAC節點上運行。通過將PARALLEL_FORCE_LOCAL設置為true,并行服務器進程受到限制,因此它們只能在查詢協調程序所在的同一個Oracle RAC節點(執行SQL語句的節點)上運行 默認FORCE,就是可以使用其他節點的CPU,并不是說在其他節點執行SQL,執行SQL還是本節點(即PX在本節點),但是可以使用其他節點的資源做coordinator process即QC(就是管理下面這些并行度的一個進程,一個個的并行程序叫parallel execution servers即PX),此參數最好設置為TRUE
PARALLEL_MAX_SERVERS specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle Database increases the number of processes from the number created at instance startup up to this value PARALLEL_MAX_SERVERS指定實例的并行執行進程和并行恢復進程的最大數量。隨著需求的增加,Oracle數據庫將實例啟動時創建的進程數量增加到此值
PARALLEL_MIN_SERVERS specifies the minimum number of parallel execution processes for the instance. This value is the number of parallel execution processes Oracle creates when the instance is started PARALLEL_MIN_SERVERS指定實例的最小并行執行進程數。 該值是在實例啟動時由Oracle創建的并行執行進程的數量 PARALLEL_MIN_SERVERS默認是0,如果修改為5,說明就算是空閑不用,也開啟5個進程,相關視圖v$px_process 比如一開機就有ora_p001_sid、ora_p002_sid、ora_p003_sid、ora_p004_sid、ora_p004_sid這樣5個進程,這就是partition slave process they do parallel dml ddl and query jobs..
PARALLEL_DEGREE_POLICY specifies whether or not automatic degree of Parallelism,statement queuing, and in-memory parallel execution will be enabled PARALLEL_DEGREE_POLICY指定是否啟用并行度,語句排隊和內存中并行執行的自動程度
PARALLEL_MIN_PERCENT lets you specify the minimum percentage of the requested number of parallel execution processes required for parallel execution. This parameter controls the behavior for parallel operations when parallel statement queuing is not enabled (when PARALLEL_DEGREE_POLICY is set to manual or limited). It ensures that an operation always gets a minimum percentage of parallel execution servers or errors out. Setting this parameter ensures that parallel operations will not execute unless adequate resources are available. The default value of 0 means that no minimum percentage of processes has been set. If 8 of the 10 parallel execution processes are busy, only 2 processes are available. If you then request a query with a degree of parallelism of 8, the minimum 50% will not be met. PARALLEL_MIN_PERCENT可以指定并行執行所需的并行執行進程的最小數量百分比。 并行語句隊列未啟用時(PARALLEL_DEGREE_POLICY設置為manual or limited),此參數控制并行操作的行為。它確保操作始終獲得并行執行服務器的最小百分比或出錯。設置此參數可確保并行操作不會執行,除非提供足夠的資源。默認值0意味著沒有設置最小進程百分比。
PARALLEL_SERVERS_TARGET specifies the number of parallel server processes allowed to run parallel statements before statement queuing will be used. When the parameter PARALLEL_DEGREE_POLICY is set to AUTO, Oracle will queue SQL statements that require parallel execution, if the necessary parallel server processes are not available. PARALLEL_SERVERS_TARGE指定在使用語句排隊之前允許運行并行語句的并行服務器進程的數量。當參數PARALLEL_DEGREE_POLICY設置為AUTO時,如果必需的并行服務器進程不可用,Oracle將對需要并行執行的SQL語句進行排隊。
PARALLEL_MIN_TIME_THRESHOLD specifies the minimum execution time a statement should have before the statement is considered for automatic degree of parallelism. By default, this is set to 10 seconds. Automatic degree of parallelism is only enabled if PARALLEL_DEGREE_POLICY is set to AUTO or LIMITED. PARALLEL_MIN_TIME_THRESHOLD指定語句在考慮自動并行度之前語句應該具有的最短執行時間。默認情況下,它被設置為10秒。自動并行度僅在PARALLEL_DEGREE_POLICY設置為AUTO或LIMITED時才能使用。
PARALLEL_ADAPTIVE_MULTI_USER, when set to true, enables an adaptive algorithm designed to improve performance in multiuser environments that use parallel execution. The algorithm automatically reduces the requested degree of parallelism based on the system load at query startup time. The effective degree of parallelism is based on the default degree of parallelism, or the degree from the table or hints, divided by a reduction facto PARALLEL_ADAPTIVE_MULTI_USER,當設置為true時,啟用一個自適應算法,旨在提高使用并行執行的多用戶環境的性能。該算法根據查詢啟動時的系統負載自動降低請求的并行度。并行度的有效程度是基于默認的并行度,或者從表或者提示的程度除以還原因子