INDEX CREATION - PARALLEL [message #494861] |
Thu, 17 February 2011 06:22 |
jesuisantony
Messages: 166 Registered: July 2006 Location: Chennai
|
Senior Member |
|
|
Hi All,
We are trying to create an index using parallelism. The table contains 24 Million row. But It takes very long time. Also we are unable to see any sessions confirming that the index creation is using parallelism. The creation goes on for more than 3 hours. SQL statement executed :
CREATE INDEX ANT.ANT_OM_TRAN ON APPS.ANT_OM_TRAN_INDX (last_update_date) PARALLEL 4 TABLESPACE APPS_TS_IDX;
I found out the session using the query
select sid,serial#,program,module,osuser,username,machine,inst_id,sql_id
from gv$session where type not in ( 'BACKGROUND') and machine='APCUSDE'
and osuser='applmgr' and program like 'sqlplus%' order by logon_time ;
select * from gv$sqltext where sql_id='akrr2ww1ukq5z';
The given queries were used to check if it was using parallelism, but i was unable to find anything.
SELECT QCSID, SID, INST_ID "Inst", SERVER_GROUP "Group", SERVER_SET "Set",
NAME "Stat Name", VALUE
FROM GV$PX_SESSTAT A, V$STATNAME B
WHERE A.STATISTIC# = B.STATISTIC# AND NAME LIKE 'PHYSICAL READS'
AND VALUE > 0 ORDER BY QCSID, QCINST_ID, SERVER_GROUP, SERVER_SET;
SELECT * FROM V$PX_PROCESS;
Let me know, how can i make sure that, it is using parallelism.
Regards,
Antony
|
|
|
|
Re: INDEX CREATION - PARALLEL [message #495024 is a reply to message #494861] |
Thu, 17 February 2011 11:21 |
jesuisantony
Messages: 166 Registered: July 2006 Location: Chennai
|
Senior Member |
|
|
This is good one to learn. But irrespective of the SQL statement with PARALLEL attribute or not, the value is always enabled for pddl_status. We are also doing performance drill down, as why this takes much time.
Before that we were trying to execute index for testing purpose in the testing server. When we issued parallel as 2, there were 4 sessions under V$PX_PROCESS. Similarly for value 3,4 there were 6,8 sessions respectively. Any PARALLEL value greater than 4 be it either 10 or 20, the V$PX_PROCESS lists only 8 sessions. How does Oracle work on this?
|
|
|
|
|