Home » RDBMS Server » Server Administration » INDEX CREATION - PARALLEL (Oracle Enterprise Edition 10.2.0.4, Solaris 10)
INDEX CREATION - PARALLEL [message #494861] Thu, 17 February 2011 06:22 Go to next message
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 #494867 is a reply to message #494861] Thu, 17 February 2011 06:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First check is:
select pddl_status from v$session where sid=<sid of your create index session>;

Regards
Michel
Re: INDEX CREATION - PARALLEL [message #495024 is a reply to message #494861] Thu, 17 February 2011 11:21 Go to previous messageGo to next message
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?
Re: INDEX CREATION - PARALLEL [message #495025 is a reply to message #495024] Thu, 17 February 2011 11:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> show parameter parallel%server
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
parallel_max_servers                 integer     5
parallel_min_servers                 integer     0
parallel_server                      boolean     FALSE
parallel_server_instances            integer     1

See MAX value.

Regards
Michel
Re: INDEX CREATION - PARALLEL [message #495327 is a reply to message #495025] Fri, 18 February 2011 02:32 Go to previous message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Keep in mind parallel can slow things down if the capacity isn't there.
Previous Topic: 10.2.0.5 - upgrading only 1 database
Next Topic: dba_jobs stopped running (2 Merged)
Goto Forum:
  


Current Time: Wed May 08 04:00:36 CDT 2024