Home » RDBMS Server » Performance Tuning » create table statement
create table statement [message #469271] Wed, 04 August 2010 02:07 Go to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
One script is taking more time near about 30 minutes, i there any alternate way to reduce the time

EXECUTE IMMEDIATE 'CREATE TABLE DGT_ITEMEFFORTDATA_TEMP NOLOGGING AS SELECT * FROM DGT_ITEMEFFORTDATA WHERE
OWNERTYPE = ''Prj'' AND OWNERID NOT IN (SELECT OWNERID FROM NIGHTLY_METRIC_PROJECTS)';


This table DGT_ITEMEFFORTDATA_TEMP will get 7720066 records
after creation
Re: create table statement [message #469274 is a reply to message #469271] Wed, 04 August 2010 02:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Nothing strange but your EXECUTE IMMEDIATE that most likely should not be there.

Regards
Michel
Re: create table statement [message #469276 is a reply to message #469274] Wed, 04 August 2010 02:11 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
But i have to create table inside the proc that is the requirement.
Re: create table statement [message #469282 is a reply to message #469276] Wed, 04 August 2010 02:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Coming from a Sybase/SQL server application designer?
This does not change the answer to your question unless you post what is required at http://www.orafaq.com/forum/mv/msg/84315/433888/102589/#msg_433888 (as always).

Regards
Michel
Re: create table statement [message #469300 is a reply to message #469271] Wed, 04 August 2010 03:30 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Quote:

But i have to create table inside the proc that is the requirement.

We would like to know why? What compelled you to do so?


Please have a look at the link provided by Michel.This would help you to get your answer.

Few questions:
SELECT * FROM DGT_ITEMEFFORTDATA WHERE
OWNERTYPE = 'Prj' AND OWNERID NOT IN (SELECT OWNERID FROM NIGHTLY_METRIC_PROJECTS)';

Believing statistics upto date,
1.Whats the plan for the above sql?
2. is there any index in owner_id column? What are the index on the tables used here
3. what is the count(*) returning for the above sql?
4. what is the result of SELECT (OWNERID) FROM NIGHTLY_METRIC_PROJECTS


Regards
Ved

[Updated on: Wed, 04 August 2010 03:36]

Report message to a moderator

Re: create table statement [message #469301 is a reply to message #469282] Wed, 04 August 2010 03:39 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
This is the plan of this query
explain plan for SELECT * FROM DGT_ITEMEFFORTDATA WHERE
OWNERTYPE = 'Prj' AND OWNERID NOT IN (SELECT OWNERID FROM NIGHTLY_METRIC_PROJECTS)

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| Id  | Operation          | Name                    | Rows  | Bytes | Cost (%CP
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |                         |    11M|  1362M| 53238   (
|*  1 |  FILTER            |                         |       |       |
|*  2 |   TABLE ACCESS FULL| DGT_ITEMEFFORTDATA      |    11M|  1363M| 46159   (
|*  3 |   TABLE ACCESS FULL| NIGHTLY_METRIC_PROJECTS |     1 |     5 |     4   (
--------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter( NOT EXISTS (SELECT /*+ */ 0 FROM "NIGHTLY_METRIC_PROJECTS"
              "NIGHTLY_METRIC_PROJECTS" WHERE LNNVL("OWNERID"<>:B1)))
   2 - filter("OWNERTYPE"='Prj')
   3 - filter(LNNVL("OWNERID"<>:B1))
Note
-----

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
   - 'PLAN_TABLE' is old version


This is index details
1	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_ACT	ACTIVITYCODEID	1
2	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_ITM	ITEMTYPE	1
3	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_ITM	ITEMID	2
4	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_OWN	OWNERTYPE	1
5	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_OWN	OWNERID	2
6	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_PHS	PHASEID	1
7	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_SOWN	SUPEROWNERTYPE	1
8	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_SOWN	SUPEROWNERID	2
9	DGT_ITEMEFFORTDATA	IDX_DGT_ITEMEFFORTDATA_STG	STAGEID	1


There is no index on DGT_ITEMEFFORTDATA_TEMP table

After completing this execution the count(*) of the table DGT_ITEMEFFORTDATA_TEMP is 7720066

Total no of records in NIGHTLY_METRIC_PROJECTS =1200

There is no index on NIGHTLY_METRIC_PROJECTS table

Total no of records in DGT_ITEMEFFORTDATA=13122817

[Updated on: Wed, 04 August 2010 03:43]

Report message to a moderator

Re: create table statement [message #469309 is a reply to message #469301] Wed, 04 August 2010 04:04 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Is your statistics upto date?
Does creation of an index on smaller table helps?

*Then probably you can verify the performance adding hint HASH_AJ/MERGE_AJ hint.*


does owner_id have null ?



Regards
Ved

[Updated on: Wed, 04 August 2010 04:07]

Report message to a moderator

Re: create table statement [message #469312 is a reply to message #469301] Wed, 04 August 2010 04:06 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
That's probably as fast as it's going to get.
I'd be looking at ways to avoid having to create the table in the first place.
Re: create table statement [message #469313 is a reply to message #469312] Wed, 04 August 2010 04:09 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
@Cookie,

  3 - filter(LNNVL("OWNERID"<>:B1))

Does this filter may have any impact? Why oracle uses LNNVL here?

ED:
Probably because OWNERID have null values for the outer query.

Regards
Ved

[Updated on: Wed, 04 August 2010 05:04]

Report message to a moderator

icon6.gif  Re: create table statement [message #469408 is a reply to message #469301] Wed, 04 August 2010 08:34 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
If you have an index for OWNERID on the NIGHTLY_METRIC_PROJECTS table, you could always try the following:

SELECT *
FROM   dgt_itemeffortdata i
WHERE  ownertype = 'Prj'
       AND NOT EXISTS (SELECT ownerid
                       FROM   nightly_metric_projects m
                       WHERE  m.ownerid = i.ownerid);

PS: Check out the explain plan

[Updated on: Wed, 04 August 2010 08:40] by Moderator

Report message to a moderator

Re: create table statement [message #469508 is a reply to message #469408] Thu, 05 August 2010 01:28 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
This is the plan

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| Id  | Operation          | Name                    | Rows  | Bytes | Cost (%CP
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |                         |    11M|  1362M| 53238   (
|*  1 |  FILTER            |                         |       |       |
|*  2 |   TABLE ACCESS FULL| DGT_ITEMEFFORTDATA      |    11M|  1363M| 46159   (
|*  3 |   TABLE ACCESS FULL| NIGHTLY_METRIC_PROJECTS |     1 |     5 |     4   (
--------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter( NOT EXISTS (SELECT /*+ */ 0 FROM "NIGHTLY_METRIC_PROJECTS"
              "NIGHTLY_METRIC_PROJECTS" WHERE LNNVL("OWNERID"<>:B1)))
   2 - filter("OWNERTYPE"='Prj')
   3 - filter(LNNVL("OWNERID"<>:B1))
Note
-----

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
   - 'PLAN_TABLE' is old version

21 rows selected
Re: create table statement [message #469538 is a reply to message #469508] Thu, 05 August 2010 02:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
'PLAN_TABLE' is old version

Recreate the plan table with the current script and repost.

Regards
Michel
icon6.gif  Re: create table statement [message #469646 is a reply to message #469508] Thu, 05 August 2010 06:34 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
Quote:
2 - filter("OWNERTYPE"='Prj')

What is the cardinality of "OWNERTYPE"? Maybe you need an index on this column...

[Updated on: Thu, 05 August 2010 07:57] by Moderator

Report message to a moderator

Re: create table statement [message #469657 is a reply to message #469646] Thu, 05 August 2010 07:01 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
ownertype has only one distinct value
Re: create table statement [message #469659 is a reply to message #469657] Thu, 05 August 2010 07:07 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
What, every row in the table always has ownertype = 'Prj'?
Then why does the column exist and why are you referencing it in there where clause.

Regardless I'd be very surprised, given the row counts involved, if oracle would ever use an index for this. This seems to require full table scans.
If you want to speed it up further you're probably going to have to use parallel processing, which we're busy discussing in your other thread.
Re: create table statement [message #469662 is a reply to message #469659] Thu, 05 August 2010 07:12 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
yes ,but again the same question whether
Exec dbms_stats.gather_table_stats('my_user','my_tab', degree=>dbms_stats.auto_degree); will give me the degree value , that i can use in query.
Re: create table statement [message #469666 is a reply to message #469662] Thu, 05 August 2010 07:28 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
So read the documentation to see what that setting does.
Based on what I've seen I doubt it does what you want since it appears to allow oracle to gather stats in parallel and nothing more.
Re: create table statement [message #469669 is a reply to message #469666] Thu, 05 August 2010 07:35 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
so if not then i will have to start the testing like this

EXECUTE IMMEDIATE 'CREATE TABLE DGT_ITEMEFFORTDATA_TEMP PARALLEL NOLOGGING AS SELECT /*+ PARALLEL (t1, 1)*/ * FROM DGT_ITEMEFFORTDATA t1 WHERE
OWNERTYPE = ''Prj'' AND OWNERID NOT IN (SELECT OWNERID FROM NIGHTLY_METRIC_PROJECTS)';

and then start incriment with 1 and test again untill i get the optmised one. What you suggest.
Re: create table statement [message #469673 is a reply to message #469669] Thu, 05 August 2010 07:41 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
well 1 I believe is effectively not parallel so I'd start with 2.
Alternatively, you can spend some time reading up on parallel processing in the docs and see if that tells you or wait and see if someone else on here knows, but you'd need to answer all of Michel's questions in the other thread.
Re: create table statement [message #469681 is a reply to message #469408] Thu, 05 August 2010 08:05 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
Thanks,

This reduced the time upto 30%.
Re: create table statement [message #469707 is a reply to message #469673] Thu, 05 August 2010 10:46 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
How can i see in explain plan whether our parallel option in query is using or not.
Re: create table statement [message #469708 is a reply to message #469707] Thu, 05 August 2010 10:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
prashant_ora wrote on Thu, 05 August 2010 08:46
How can i see in explain plan whether our parallel option in query is using or not.


http://www.lmgtfy.com/?q=oracle+explain+plan+parallel
Re: create table statement [message #469718 is a reply to message #469673] Thu, 05 August 2010 11:35 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
just to test it i ran one query on my server

select /*PARALLEL (pt, 2)*/ count(1) from project pt and i saw in explain plan but no parallel thread i got.

Re: create table statement [message #469719 is a reply to message #469718] Thu, 05 August 2010 11:39 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>but no parallel thread i got.
Then parallel was not used.

By the way how many rows are in table PROJECT?

t would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: create table statement [message #469724 is a reply to message #469719] Thu, 05 August 2010 11:47 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
There are 7700000 records and the index detail of this table are
Sr.  	TABLE_NAME  	INDEX_NAME  	COLUMN_NAME  	COLUMN_POSITION
1 	PROJECT 	UK_PROJECTCODE 	PROJECTCODE 	1
2 	PROJECT 	PRJ_INDEX 	ORGANIZATIONID 	1
3 	PROJECT 	PROJECT_CURREN_FK_IDX 	CURRENTPHASEID 	1
4 	PROJECT 	PROJECT_SOURCE_FK_IDX 	SOURCETEMPLATE 	1
5 	PROJECT 	PROJECT_ENTERPRISE_FK_IDX 	ENTERPRISEID 	1
6 	PROJECT 	IDX_PROJECT_STATUS 	STATUS 	1
7 	PROJECT 	SYS_C0048506 	PROJECTID 	1
8 	PROJECT 	PROJ_IDX2 	CATEGORY 	1
Re: create table statement [message #469726 is a reply to message #469718] Thu, 05 August 2010 11:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
select /*PARALLEL (pt, 2)*/ count(1) from project pt and i saw in explain plan but no parallel thread i got.


As you are a beginner do we trust the interpretation of what you did and saw?

Regards
Michel
Re: create table statement [message #469734 is a reply to message #469726] Thu, 05 August 2010 12:02 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
Whatever I did I shared .
Re: create table statement [message #469738 is a reply to message #469734] Thu, 05 August 2010 12:11 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
You could post the explain plan
Re: create table statement [message #469739 is a reply to message #469734] Thu, 05 August 2010 12:11 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
show parameter parallel

post results from above

ALWAYS
Post Operating System (OS) name & version for DB server system.
Post results of
SELECT * from v$version;
Re: create table statement [message #469741 is a reply to message #469734] Thu, 05 August 2010 12:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
prashant_ora wrote on Thu, 05 August 2010 19:02
Whatever I did I shared .

Quote:
select /*PARALLEL (pt, 2)*/ count(1) from project pt and i saw in explain plan but no parallel thread i got.

Maybe you saw but not us.

Regards
Michel
Re: create table statement [message #469750 is a reply to message #469734] Thu, 05 August 2010 12:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It works for me!
SQL> select /* FULL(LRG_TBL) PARALLEL(LRG_TBL, 2)  */ SUM(BUCKET) FROM LRG_TBL
  2  /

SUM(BUCKET)
-----------
 2278646955


Execution Plan
----------------------------------------------------------
Plan hash value: 477856889

----------------------------------------------------------------------------------------------------------------
| Id  | Operation	       | Name	  | Rows  | Bytes | Cost (%CPU)| Time	  |    TQ  |IN-OUT| PQ Distrib |
----------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |	  |	1 |	4 |  1700   (1)| 00:00:21 |	   |	  |	       |
|   1 |  SORT AGGREGATE        |	  |	1 |	4 |	       |	  |	   |	  |	       |
|   2 |   PX COORDINATOR       |	  |	  |	  |	       |	  |	   |	  |	       |
|   3 |    PX SEND QC (RANDOM) | :TQ10000 |	1 |	4 |	       |	  |  Q1,00 | P->S | QC (RAND)  |
|   4 |     SORT AGGREGATE     |	  |	1 |	4 |	       |	  |  Q1,00 | PCWP |	       |
|   5 |      PX BLOCK ITERATOR |	  |  1579K|  6169K|  1700   (1)| 00:00:21 |  Q1,00 | PCWC |	       |
|   6 |       TABLE ACCESS FULL| LRG_TBL  |  1579K|  6169K|  1700   (1)| 00:00:21 |  Q1,00 | PCWP |	       |
----------------------------------------------------------------------------------------------------------------



Please Read The Fine FAQ!
http://www.orafaq.com/wiki/Parallel_Query_FAQ

[Updated on: Thu, 05 August 2010 12:44]

Report message to a moderator

Re: create table statement [message #469830 is a reply to message #469750] Fri, 06 August 2010 01:26 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
Hi this is the explained plan of the below query

select /*+PARALLEL (pt, 2)*/ count(1) from DGT_ITEMEFFORTDATA pt;

PLAN_TABLE_OUTPUT                                                                                                            
----------------------------------------------------------------------------------------------
                                                                                                                             
-------------------------------------------------------------------------------------------------------                      
| Id  | Operation              | Name               | Rows  | Cost (%CPU)|    TQ  |IN-OUT| PQ Distrib |                      
-------------------------------------------------------------------------------------------------------                      
|   0 | SELECT STATEMENT       |                    |     1 | 29901   (1)|        |      |            |                      
|   1 |  SORT AGGREGATE        |                    |     1 |            |        |      |            |                      
|   2 |   PX COORDINATOR       |                    |       |            |        |      |            |                      
|   3 |    PX SEND QC (RANDOM) | :TQ10000           |     1 |            |  Q1,00 | P->S | QC (RAND)  |                      
|   4 |     SORT AGGREGATE     |                    |     1 |            |  Q1,00 | PCWP |            |                      
|   5 |      PX BLOCK ITERATOR |                    |    13M| 29901   (1)|  Q1,00 | PCWC |            |                      
|   6 |       TABLE ACCESS FULL| DGT_ITEMEFFORTDATA |    13M| 29901   (1)|  Q1,00 | PCWP |            |                      
-------------------------------------------------------------------------------------------------------     


One thing is not clear to me is that when i run the query without using the explain plan for and see the output from gv$sql_plan there i can not get the PX COORDINATOR stuff while i run this query select * from table(dbms_xplan.display);
i get the PX COORDINATOR stuff.

[Updated on: Fri, 06 August 2010 02:48] by Moderator

Report message to a moderator

Re: create table statement [message #469847 is a reply to message #469830] Fri, 06 August 2010 02:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
the output from gv$sql_plan there i can not get the PX COORDINATOR stuff

If you say so, WE do not see anything once more.

Regards
Michel
Re: create table statement [message #469856 is a reply to message #469847] Fri, 06 August 2010 02:39 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
whenever i try to get the outpot from
select * from gv$sql where sql_id=? then i copy and paste the ooutput in side the add code option, but when i see the preview, its not clear.So tell me how can i attach the output.
Re: create table statement [message #469858 is a reply to message #469856] Fri, 06 August 2010 02:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use SQL*Plus.

Regards
Michel
Re: create table statement [message #469863 is a reply to message #469750] Fri, 06 August 2010 03:06 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
I tried both the option parallel and without parallel, but in timing i did not get any difference

here is the plan of both the query

explain plan for select /*+PARALLEL (pt, 2)*/ count(1) from DGT_ITEMEFFORTDATA pt;

PMSMARTDB on 06-AUG-10 at pmsdb >select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT                                                                                                            
-----------------------------------------------------------------------------------------------------------------------------
                                                                                                                             
-------------------------------------------------------------------------------------------------------                      
| Id  | Operation              | Name               | Rows  | Cost (%CPU)|    TQ  |IN-OUT| PQ Distrib |                      
-------------------------------------------------------------------------------------------------------                      
|   0 | SELECT STATEMENT       |                    |     1 | 29901   (1)|        |      |            |                      
|   1 |  SORT AGGREGATE        |                    |     1 |            |        |      |            |                      
|   2 |   PX COORDINATOR       |                    |       |            |        |      |            |                      
|   3 |    PX SEND QC (RANDOM) | :TQ10000           |     1 |            |  Q1,00 | P->S | QC (RAND)  |                      
|   4 |     SORT AGGREGATE     |                    |     1 |            |  Q1,00 | PCWP |            |                      
|   5 |      PX BLOCK ITERATOR |                    |    13M| 29901   (1)|  Q1,00 | PCWC |            |                      
|   6 |       TABLE ACCESS FULL| DGT_ITEMEFFORTDATA |    13M| 29901   (1)|  Q1,00 | PCWP |            |                      
-------------------------------------------------------------------------------------------------------                      
                                                                                                                             
Note                                                                                                                         
-----                                                                                                                        
   - 'PLAN_TABLE' is old version                                                                                             

16 rows selected.


explain plan for select /*PARALLEL (pt, 2)*/ count(1) from DGT_ITEMEFFORTDATA pt;

PLAN_TABLE_OUTPUT                                                                                                            
-----------------------------------------------------------------------------------------------------------------------------
                                                                                                                             
----------------------------------------------------------------------                                                       
| Id  | Operation          | Name               | Rows  | Cost (%CPU)|                                                       
----------------------------------------------------------------------                                                       
|   0 | SELECT STATEMENT   |                    |     1 | 54016   (1)|                                                       
|   1 |  SORT AGGREGATE    |                    |     1 |            |                                                       
|   2 |   TABLE ACCESS FULL| DGT_ITEMEFFORTDATA |    13M| 54016   (1)|                                                       
----------------------------------------------------------------------                                                       
                                                                                                                             
Note                                                                                                                         
-----                                                                                                                        
   - 'PLAN_TABLE' is old version                                                                                             

12 rows selected.
[u][/u]


Even I incremented the degree value by 1 and reched upto 10 , but the timing was same in every case.
The total no of records are coming is 13191274
Re: create table statement [message #469865 is a reply to message #469863] Fri, 06 August 2010 03:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
'PLAN_TABLE' is old version

Once more, recreate the plan table with the script of your version.

Quote:
I tried both the option parallel and without parallel, but in timing i did not get any difference

So in your case (hardware, workload) PARALLEL does not give any profit.

And DO NOT use COUNT(1) but COUNT(*).

Regards
Michel
Re: create table statement [message #469867 is a reply to message #469865] Fri, 06 August 2010 03:15 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
hey this is the initora parameter value
 
 NAME!12	 	TYPE!2	 VALUE!12	 DISPLAY_VALUE!12	 ISDEFAULT!12	 ISSES_MODIFIABLE!12	   
parallel_min_servers	3	0	         0	                 TRUE	         FALSE	   
parallel_max_servers	3	80	        80	                 TRUE	         FALSE	   
parallel_automatic_tuning1      FALSE	        FALSE	                 TRUE	         FALSE


See the value of initora parameter , where this value create any problem.
Re: create table statement [message #469868 is a reply to message #469867] Fri, 06 August 2010 03:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Which problem?

Regards
Michel
Re: create table statement [message #469869 is a reply to message #469868] Fri, 06 August 2010 03:24 Go to previous messageGo to previous message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
because of these parameter setting , system is not using parallel option or what can be other reason not to use paralle option. Even these table is not avilable in my server

select * from v_$pq_sysstat;
SELECT * FROM v_$px_process;
SELECT * FROM v_$px_sesstat;
SELECT * FROM v_$px_process_sysstat;
Previous Topic: Partitions
Next Topic: create table statement with union
Goto Forum:
  


Current Time: Tue Apr 30 14:18:01 CDT 2024