Saturday, May 30, 2015

Find Parallel Index and Stop Parallel Operation.

This will help us to find parallel Index and stop Parallel Execution.

SQL> SET LINE 200
SQL> SET VERIFY OFF;
SQL> COLUMN DEGREE                FORMAT 999            HEAD 'Number Of CPU'
SQL> COLUMN LAST_ANALYZED         FORMAT a30            HEAD 'Last Stat'
SQL> COLUMN NUM_ROWS              FORMAT 999,999,999 HEAD 'Number Of Rows'
SQL> COLUMN PARTITIONED           FORMAT a10         HEAD 'Partition Status'
SQL> SELECT DEGREE, LAST_ANALYZED, NUM_ROWS,PARTITIONED
  2  FROM ALL_INDEXES
  3  WHERE UPPER(OWNER)=UPPER('&Owner')
  4  AND UPPER(INDEX_NAME)=UPPER('&Index');
Enter value for owner: part
Enter value for index: IND_ORDER_LIST

Number Of CPU                            Last Stat                      Number Of Rows Partition
---------------------------------------- ------------------------------ -------------- ----------
16                                       30-MAY-15                                   0 NO

SQL>

====== Stop Parallel Execution =====

SQL> ALTER INDEX PART.IND_ORDER_LIST NOPARALLEL;

Index altered.

SQL>
SQL> SELECT DEGREE, LAST_ANALYZED, NUM_ROWS,PARTITIONED
  2  FROM ALL_INDEXES
  3  WHERE UPPER(OWNER)=UPPER('&Owner')
  4  AND UPPER(INDEX_NAME)=UPPER('&Index');
Enter value for owner: part
Enter value for index: IND_ORDER_LIST

Number Of CPU                            Last Stat                      Number Of Rows Partition
---------------------------------------- ------------------------------ -------------- ----------
1                                        30-MAY-15                                   0 NO

SQL>

No comments:

Post a Comment