Could execution plan be influenced when CPU_COUNT changed?
Dear guru,
I have a question about optimizer.
I migrated DB server from IBM p5 570 1.6GHz 16 core to p6 570 5.0GHz 8 core. Only servers was changed and storage was attached to new server without any modification.
In such cases, could execution plan be influenced ? If query plan is changed, I was wondering what factor have an influence on optimizer.
Hi Aden,
You can refer the link Optimizer
*009*
Similar Messages
-
Planning getting hanged when i change a member hierarchy
Hi,
When i try to change the hierarchy of a member by cutting and pasting it or through outlineload.cmd, planning is getting hanged. I get java heap space error. We have set the intial and max heap size in the registry as
1. Initial heap size = -Xms1024m
2. Max heap size = -Xmx1024m
Even the planning service is not responding. And planning web is not even opening now.
There is another entry in the registry named JVMOption10 = -Xss256k.
What has to be done?
Regards,
Ragav.
Edited by: ragavhere on Mar 25, 2011 6:52 PM
Edited by: ragavhere on Mar 25, 2011 7:01 PMHi John,
There was workflow enabled for a particular scenario. I've cleared it. Now i am able to delete. Thanks a lot.
But otherwise when workflow is enabled and if i have to change the hierarchy, how is this scenario managed? Is this the only way?
Regards,
Ragav. -
Execution plan change when querying count(*)
Hi,
Could any one please help me....
Here are my queries
1. select * from my_vew
2. select count(*) from my_view
Explain plan on the above queries are giving differnt plans. I would like to get the plan for count(*) as exactkly same as query no 1. Even I tried explain plan for the below query, which is also not giving the same plan..
select count(*) from (select * from my_view);
All I am trying to do here is to find the total run time without spending much time on passing the result to the client over a network (I beleive set autotrace traceonly option is also passing the result to the network.. only thing is that traceonly option wont display the results). count(*) query is chaning the plan in many ways such as index scan in place of full_table scan and etc.,
Thanks in advance.
Vasanthwhy you want select count(*) from <table>,cause count(*) did single call neednt arraysize to be big which in turn less
LIO,when less LIO then high throughput which is not the case with select * from <table>,i dont know the internals of count(*)
but there would be some mechanics behind this code which always return with less IO
SQL> conn scott/tiger
Connected.
SQL> column plan_plus_exp format a100
SQL> set linesize 1000
SQL> desc t
Name
A
OBJECT_NAME
SQL> select index_name from user_indexes where lower(table_name)='t'
2 /
no rows selected
SQL> select count(*) from t
2 /
COUNT(*)
23486
SQL> set autotrace traceonly
SQL> select * from t
2 /
23486 rows selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=13 Card=23486 Bytes=681094)
1 0 TABLE ACCESS (FULL) OF 'T' (Cost=13 Card=23486 Bytes=681094)
Statistics
23 recursive calls
0 db block gets
1678 consistent gets
0 physical reads
0 redo size
923712 bytes sent via SQL*Net to client
17714 bytes received via SQL*Net from client
1567 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
23486 rows processed
SQL> select count(*) from t
2 /
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=13 Card=1)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'T' (Cost=13 Card=23486)
Statistics
0 recursive calls
0 db block gets
118 consistent gets
0 physical reads
0 redo size
381 bytes sent via SQL*Net to client
499 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processedyou need to compare boths query result consistent gets as well bytes sent via SQL*Net to client and bytes received via SQL*Net from client.
What yours requirment to get alls record as well as maximum throughput,its not the way to do.Just a clue try to implement bulk collect in this case.
Khurram -
Query Execution Plans Change between 2 servers even when we have same data.
Hi Friends,
Currently One of the Query which normally takes 15 seconds but it started taking 160 seconds.So same query was executed on the secondary site and the query returned in 15 seconds which is expected.Raised a call with ORacle and they are still investigating since 27th Sept.
Oracle version=11.2.0.2
OS=Solaris 10.
Issue DB execution plan
select * From tibex_openinghomemktok as of scn 17032999332 where meid='ME1'
call count cpu elapsed disk query current rows
Parse 1 0.12 0.12 0 0 0 0
Execute 1 161.20 161.21 55 1539719 206 0
Fetch 6 0.05 0.05 190 386 1 464
total 8 161.37 161.38 245 1540105 207 464
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 191
Number of plan statistics captured: 1
Rows (1st) Rows (avg) Rows (max) Row Source Operation
464 464 464 VIEW TIBEX_OPENINGHOMEMKTOK (cr=1540105 pr=245 pw=191 time=161246176 us cost=149 size=291 card=1)
464 464 464 TEMP TABLE TRANSFORMATION (cr=1540105 pr=245 pw=191 time=161245860 us)
0 0 0 LOAD AS SELECT (cr=27 pr=0 pw=1 time=24101 us)
13 13 13 HASH JOIN (cr=27 pr=0 pw=0 time=13149 us cost=35 size=1408 card=8)
1 1 1 TABLE ACCESS FULL TIBEX_TRADINGMETHODENUM (cr=2 pr=0 pw=0 time=83 us cost=5 size=14 card=1)
235 235 235 HASH JOIN (cr=25 pr=0 pw=0 time=12612 us cost=30 size=22356 card=138)
235 235 235 NESTED LOOPS OUTER (cr=21 pr=0 pw=0 time=11568 us cost=22 size=16560 card=138)
235 235 235 HASH JOIN (cr=20 pr=0 pw=0 time=10831 us cost=22 size=10074 card=138)
40 40 40 HASH JOIN (cr=18 pr=0 pw=0 time=8119 us cost=17 size=2200 card=40)
40 40 40 HASH JOIN OUTER (cr=12 pr=0 pw=0 time=5920 us cost=13 size=1320 card=40)
40 40 40 NESTED LOOPS (cr=10 pr=0 pw=0 time=4155 us cost=3 size=800 card=40)
80 80 80 VIEW index$_join$_018 (cr=6 pr=0 pw=0 time=4245 us cost=3 size=1040 card=80)
80 80 80 HASH JOIN (cr=6 pr=0 pw=0 time=3057 us)
80 80 80 INDEX FAST FULL SCAN XAK1TIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=169 us cost=1 size=1040 card=80)(object id 1354894)
80 80 80 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=70 us cost=1 size=1040 card=80)(object id 1354895)
40 40 40 INDEX UNIQUE SCAN XPKTIBEX_DAYSTRADINGCYCLEMAP (cr=4 pr=0 pw=0 time=152 us cost=0 size=7 card=1)(object id 1354685)
0 0 0 VIEW (cr=2 pr=0 pw=0 time=316 us cost=10 size=143 card=11)
0 0 0 HASH JOIN (cr=2 pr=0 pw=0 time=315 us cost=8 size=352 card=11)
0 0 0 MERGE JOIN (cr=2 pr=0 pw=0 time=118 us cost=4 size=209 card=11)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_HOLIDAYS (cr=2 pr=0 pw=0 time=113 us cost=2 size=26 card=2)
83 83 83 INDEX FULL SCAN XPKTIBEX_HOLIDAYS (cr=1 pr=0 pw=0 time=113 us cost=1 size=0 card=83)(object id 1354737)
0 0 0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us cost=2 size=2412 card=402)
0 0 0 INDEX FULL SCAN XPKTIBEX_HOLIDAYTRADINGCYCLEMA (cr=0 pr=0 pw=0 time=0 us cost=1 size=2412 card=402)(object id 1354739)
0 0 0 VIEW index$_join$_023 (cr=0 pr=0 pw=0 time=0 us cost=3 size=1040 card=80)
0 0 0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX FAST FULL SCAN XAK1TIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=1040 card=80)(object id 1354894)
0 0 0 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=1040 card=80)(object id 1354895)
80 80 80 VIEW index$_join$_024 (cr=6 pr=0 pw=0 time=1121 us cost=3 size=1760 card=80)
80 80 80 HASH JOIN (cr=6 pr=0 pw=0 time=1040 us)
80 80 80 INDEX FAST FULL SCAN XAK1TIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=66 us cost=1 size=1760 card=80)(object id 1354894)
80 80 80 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=57 us cost=1 size=1760 card=80)(object id 1354895)
275 275 275 TABLE ACCESS FULL TIBEX_CYCLEPERIODMAP (cr=2 pr=0 pw=0 time=229 us cost=5 size=4950 card=275)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=384 us cost=0 size=47 card=1)
0 0 0 INDEX UNIQUE SCAN XPKTIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=135 us cost=0 size=0 card=1)(object id 1354925)
330 330 330 TABLE ACCESS FULL TIBEX_TRADINGPERIOD (cr=4 pr=0 pw=0 time=61 us cost=7 size=13860 card=330)
0 0 0 LOAD AS SELECT (cr=1539692 pr=55 pw=190 time=161190726 us)
12435 12435 12435 NESTED LOOPS (cr=1539692 pr=55 pw=0 time=158262964 us cost=109 size=284 card=1)
12435 12435 12435 FILTER (cr=1539688 pr=55 pw=0 time=158208902 us)
497400 497400 497400 NESTED LOOPS OUTER (cr=1539688 pr=55 pw=0 time=212847780 us cost=109 size=280 card=1)
497400 497400 497400 NESTED LOOPS (cr=544888 pr=55 pw=0 time=60349504 us cost=108 size=267 card=1)
497400 497400 497400 MERGE JOIN CARTESIAN (cr=47484 pr=55 pw=0 time=57182690 us cost=107 size=254 card=1)
12435 12435 12435 NESTED LOOPS (cr=47483 pr=55 pw=0 time=2368168 us cost=106 size=247 card=1)
13877 13877 13877 NESTED LOOPS (cr=33602 pr=55 pw=0 time=5930848 us cost=105 size=233 card=1)
1473 1473 1473 NESTED LOOPS (cr=212 pr=2 pw=0 time=9371 us cost=35 size=390 card=3)
13 13 13 HASH JOIN (cr=193 pr=1 pw=0 time=8029 us cost=34 size=116 card=1)
13 13 13 NESTED LOOPS (cr=191 pr=1 pw=0 time=7255 us cost=31 size=95 card=1)
338 338 338 HASH JOIN (cr=187 pr=1 pw=0 time=6329 us cost=31 size=2821 card=31)
13 13 13 VIEW VW_NSO_1 (cr=184 pr=1 pw=0 time=5958 us cost=26 size=26 card=1)
13 13 13 SORT GROUP BY (cr=184 pr=1 pw=0 time=5954 us cost=26 size=115 card=1)
65 65 65 NESTED LOOPS ANTI (cr=184 pr=1 pw=0 time=5898 us cost=25 size=115 card=1)
78 78 78 NESTED LOOPS (cr=102 pr=1 pw=0 time=6140 us cost=24 size=101 card=1)
78 78 78 NESTED LOOPS OUTER (cr=20 pr=1 pw=0 time=5341 us cost=23 size=94 card=1)
78 78 78 HASH JOIN (cr=19 pr=1 pw=0 time=5077 us cost=23 size=55 card=1)
13 13 13 HASH JOIN (cr=17 pr=1 pw=0 time=4056 us cost=17 size=352 card=8)
40 40 40 NESTED LOOPS (cr=13 pr=0 pw=0 time=3300 us cost=15 size=1480 card=40)
40 40 40 HASH JOIN OUTER (cr=9 pr=0 pw=0 time=2928 us cost=15 size=1320 card=40)
40 40 40 HASH JOIN (cr=7 pr=0 pw=0 time=1976 us cost=5 size=800 card=40)
40 40 40 INDEX RANGE SCAN XPKTIBEX_DAYSTRADINGCYCLEMAP (cr=1 pr=0 pw=0 time=120 us cost=1 size=280 card=40)(object id 1354685)
80 80 80 VIEW index$_join$_044 (cr=6 pr=0 pw=0 time=1251 us cost=3 size=1040 card=80)
80 80 80 HASH JOIN (cr=6 pr=0 pw=0 time=1249 us)
80 80 80 INDEX FAST FULL SCAN XAK1TIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=70 us cost=1 size=1040 card=80)(object id 1354894)
80 80 80 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=3 pr=0 pw=0 time=135 us cost=1 size=1040 card=80)(object id 1354895)
0 0 0 VIEW (cr=2 pr=0 pw=0 time=295 us cost=10 size=143 card=11)
0 0 0 HASH JOIN (cr=2 pr=0 pw=0 time=293 us cost=8 size=352 card=11)
0 0 0 MERGE JOIN (cr=2 pr=0 pw=0 time=118 us cost=4 size=209 card=11)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_HOLIDAYS (cr=2 pr=0 pw=0 time=113 us cost=2 size=26 card=2)
83 83 83 INDEX FULL SCAN XPKTIBEX_HOLIDAYS (cr=1 pr=0 pw=0 time=116 us cost=1 size=0 card=83)(object id 1354737)
0 0 0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us cost=2 size=2412 card=402)
0 0 0 INDEX FULL SCAN XPKTIBEX_HOLIDAYTRADINGCYCLEMA (cr=0 pr=0 pw=0 time=0 us cost=1 size=2412 card=402)(object id 135473
9)
0 0 0 VIEW index$_join$_049 (cr=0 pr=0 pw=0 time=0 us cost=3 size=1040 card=80)
0 0 0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
0 0 0 INDEX FAST FULL SCAN XAK1TIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=1040 card=80)(object id 1354894)
0 0 0 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=1040 card=80)(object id 1354895)
40 40 40 INDEX UNIQUE SCAN XPKTIBEX_TRADINGCYCLE (cr=4 pr=0 pw=0 time=79 us cost=0 size=4 card=1)(object id 1354895)
13 13 13 VIEW (cr=4 pr=1 pw=0 time=362 us cost=2 size=112 card=16)
13 13 13 TABLE ACCESS FULL SYS_TEMP_0FD9D660D_F7392ACA (cr=4 pr=1 pw=0 time=349 us cost=2 size=1216 card=16)
275 275 275 TABLE ACCESS FULL TIBEX_CYCLEPERIODMAP (cr=2 pr=0 pw=0 time=164 us cost=5 size=3025 card=275)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=136 us cost=0 size=39 card=1)
0 0 0 INDEX UNIQUE SCAN XPKTIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=52 us cost=0 size=0 card=1)(object id 1354925)
78 78 78 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGPERIOD (cr=82 pr=0 pw=0 time=343 us cost=1 size=7 card=1)
78 78 78 INDEX UNIQUE SCAN XPKTIBEX_TRADINGPERIOD (cr=4 pr=0 pw=0 time=144 us cost=0 size=0 card=1)(object id 1354899)
13 13 13 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGMETHODENUM (cr=82 pr=0 pw=0 time=252 us cost=1 size=14 card=1)
78 78 78 INDEX UNIQUE SCAN XPKTIBEX_TRADINGMETHODENUM (cr=4 pr=0 pw=0 time=98 us cost=0 size=0 card=1)(object id 1354897)
0 0 0 INDEX FAST FULL SCAN XPKTIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=1040 card=80)(object id 1354895)
40 40 40 INDEX UNIQUE SCAN XPKTIBEX_TRADINGCYCLE (cr=4 pr=0 pw=0 time=79 us cost=0 size=4 card=1)(object id 1354895)
13 13 13 VIEW (cr=4 pr=1 pw=0 time=362 us cost=2 size=112 card=16)
13 13 13 TABLE ACCESS FULL SYS_TEMP_0FD9D660D_F7392ACA (cr=4 pr=1 pw=0 time=349 us cost=2 size=1216 card=16)
275 275 275 TABLE ACCESS FULL TIBEX_CYCLEPERIODMAP (cr=2 pr=0 pw=0 time=164 us cost=5 size=3025 card=275)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=136 us cost=0 size=39 card=1)
0 0 0 INDEX UNIQUE SCAN XPKTIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=52 us cost=0 size=0 card=1)(object id 1354925)
78 78 78 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGPERIOD (cr=82 pr=0 pw=0 time=343 us cost=1 size=7 card=1)
78 78 78 INDEX UNIQUE SCAN XPKTIBEX_TRADINGPERIOD (cr=4 pr=0 pw=0 time=144 us cost=0 size=0 card=1)(object id 1354899)
13 13 13 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGMETHODENUM (cr=82 pr=0 pw=0 time=252 us cost=1 size=14 card=1)
78 78 78 INDEX UNIQUE SCAN XPKTIBEX_TRADINGMETHODENUM (cr=4 pr=0 pw=0 time=98 us cost=0 size=0 card=1)(object id 1354897)
275 275 275 MERGE JOIN OUTER (cr=3 pr=0 pw=0 time=892 us cost=5 size=17875 card=275)
275 275 275 TABLE ACCESS BY INDEX ROWID TIBEX_CYCLEPERIODMAP (cr=2 pr=0 pw=0 time=401 us cost=2 size=4950 card=275)
275 275 275 INDEX FULL SCAN XPKTIBEX_CYCLEPERIODMAP (cr=1 pr=0 pw=0 time=115 us cost=1 size=0 card=275)(object id 1354681)
0 0 0 SORT JOIN (cr=1 pr=0 pw=0 time=207 us cost=3 size=47 card=1)
0 0 0 TABLE ACCESS FULL TIBEX_CYCLEPERIODMAPOVER (cr=1 pr=0 pw=0 time=17 us cost=2 size=47 card=1)
13 13 13 INDEX UNIQUE SCAN XPKTIBEX_TRADINGCYCLE (cr=4 pr=0 pw=0 time=349 us cost=0 size=4 card=1)(object id 1354895)
13 13 13 VIEW (cr=2 pr=0 pw=0 time=52 us cost=2 size=336 card=16)
13 13 13 TABLE ACCESS FULL SYS_TEMP_0FD9D660D_F7392ACA (cr=2 pr=0 pw=0 time=49 us cost=2 size=1216 card=16)
1473 1473 1473 INDEX RANGE SCAN XPKTIBEX_INSTRUMENTBOARDMAP (cr=19 pr=1 pw=0 time=1378 us cost=1 size=504 card=36)(object id 1354759)
13877 13877 13877 TABLE ACCESS BY INDEX ROWID TIBEX_INSTRUMENTADMIN (cr=33390 pr=53 pw=0 time=2023879 us cost=27 size=103 card=1)
44576 44576 44576 INDEX RANGE SCAN SYS_C001331991 (cr=1277 pr=53 pw=0 time=43026 us cost=1 size=0 card=35)(object id 1354964)
12435 12435 12435 TABLE ACCESS BY INDEX ROWID TIBEX_INSTRACTIONENUM (cr=13881 pr=0 pw=0 time=81117 us cost=1 size=14 card=1)
13877 13877 13877 INDEX UNIQUE SCAN XPKTIBEX_INSTRACTIONENUM (cr=4 pr=0 pw=0 time=32628 us cost=0 size=0 card=1)(object id 1354753)
497400 497400 497400 BUFFER SORT (cr=1 pr=0 pw=0 time=323076 us cost=106 size=280 card=40)
40 40 40 INDEX RANGE SCAN XPKTIBEX_DAYSTRADINGCYCLEMAP (cr=1 pr=0 pw=0 time=61 us cost=1 size=280 card=40)(object id 1354685)
497400 497400 497400 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGCYCLE (cr=497404 pr=0 pw=0 time=2609562 us cost=1 size=13 card=1)
497400 497400 497400 INDEX UNIQUE SCAN XPKTIBEX_TRADINGCYCLE (cr=4 pr=0 pw=0 time=1019970 us cost=0 size=0 card=1)(object id 1354895)
0 0 0 VIEW PUSHED PREDICATE (cr=994800 pr=0 pw=0 time=151415026 us cost=1 size=13 card=1)
0 0 0 HASH JOIN (cr=994800 pr=0 pw=0 time=150806856 us cost=7 size=32 card=1)
0 0 0 MERGE JOIN (cr=994800 pr=0 pw=0 time=19714460 us cost=4 size=209 card=11)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_HOLIDAYS (cr=994800 pr=0 pw=0 time=18729534 us cost=2 size=26 card=2)
41284200 41284200 41284200 INDEX FULL SCAN XPKTIBEX_HOLIDAYS (cr=497400 pr=0 pw=0 time=16264606 us cost=1 size=0 card=83)(object id 1354737)
0 0 0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us cost=2 size=2412 card=402)
0 0 0 INDEX FULL SCAN XPKTIBEX_HOLIDAYTRADINGCYCLEMA (cr=0 pr=0 pw=0 time=0 us cost=1 size=2412 card=402)(object id 1354739)
0 0 0 TABLE ACCESS BY INDEX ROWID TIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=2 size=26 card=2)
0 0 0 INDEX RANGE SCAN XAK1TIBEX_TRADINGCYCLE (cr=0 pr=0 pw=0 time=0 us cost=1 size=0 card=2)(object id 1354894)
12435 12435 12435 INDEX UNIQUE SCAN XPKTIBEX_TRADINGPERIOD (cr=4 pr=0 pw=0 time=33106 us cost=0 size=4 card=1)(object id 1354899)
464 464 464 HASH JOIN SEMI (cr=386 pr=190 pw=0 time=30227 us cost=6 size=331 card=1)
5684 5684 5684 VIEW (cr=194 pr=190 pw=0 time=8864 us cost=2 size=582 card=2)
12435 12435 12435 TABLE ACCESS FULL SYS_TEMP_0FD9D660E_F7392ACA (cr=194 pr=190 pw=0 time=9137 us cost=2 size=272 card=2)
1267 1267 1267 VIEW VW_NSO_2 (cr=192 pr=0 pw=0 time=13710 us cost=3 size=80 card=2)
1267 1267 1267 HASH GROUP BY (cr=192 pr=0 pw=0 time=13074 us cost=3 size=38 card=2)
12435 12435 12435 VIEW (cr=192 pr=0 pw=0 time=11843 us cost=2 size=38 card=2)
12435 12435 12435 TABLE ACCESS FULL SYS_TEMP_0FD9D660E_F7392ACA (cr=192 pr=0 pw=0 time=5751 us cost=2 size=272 card=2)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 1 0.00 0.00
direct path write temp 2 0.00 0.00
direct path sync 1 0.00 0.00
db file sequential read 55 0.00 0.00
SQL*Net message to client 6 0.00 0.00
db file scattered read 2 0.00 0.00
SQL*Net message from client 6 0.00 0.00Regards
NMHi,
Execution Plan after generating stats on TIBEX_TRADINGCYCLE.
Execution Plan
Plan hash value: 1209012613
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 291 | 130 (7)| 00:00:02 |
| 1 | VIEW | TIBEX_OPENINGHOMEMKTOK | 1 | 291 | 130 (7)| 00:00:02 |
| 2 | TEMP TABLE TRANSFORMATION | | | | | |
| 3 | LOAD AS SELECT | SYS_TEMP_0FD9D662B_FB42A6E1 | | | | |
|* 4 | HASH JOIN | | 8 | 1392 | 27 (12)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | TIBEX_TRADINGMETHODENUM | 1 | 14 | 5 (0)| 00:00:01 |
|* 6 | HASH JOIN | | 138 | 22080 | 21 (10)| 00:00:01 |
| 7 | NESTED LOOPS OUTER | | 138 | 16284 | 14 (15)| 00:00:01 |
|* 8 | HASH JOIN | | 138 | 9798 | 14 (15)| 00:00:01 |
|* 9 | HASH JOIN | | 40 | 2120 | 8 (13)| 00:00:01 |
| 10 | NESTED LOOPS OUTER | | 40 | 1240 | 5 (0)| 00:00:01 |
| 11 | NESTED LOOPS | | 40 | 800 | 3 (34)| 00:00:01 |
| 12 | VIEW | index$_join$_018 | 80 | 1040 | 3 (34)| 00:00:01 |
|* 13 | HASH JOIN | | | | | |
| 14 | INDEX FAST FULL SCAN | XAK1TIBEX_TRADINGCYCLE | 80 | 1040 | 1 (0)| 00:00:01 |
| 15 | INDEX FAST FULL SCAN | XPKTIBEX_TRADINGCYCLE | 80 | 1040 | 1 (0)| 00:00:01 |
|* 16 | INDEX UNIQUE SCAN | XPKTIBEX_DAYSTRADINGCYCLEMAP | 1 | 7 | 0 (0)| 00:00:01 |
| 17 | VIEW PUSHED PREDICATE | | 1 | 11 | 1 (0)| 00:00:01 |
|* 18 | HASH JOIN | | 1 | 32 | 7 (29)| 00:00:01 |
| 19 | MERGE JOIN | | 3 | 57 | 4 (25)| 00:00:01 |
|* 20 | TABLE ACCESS BY INDEX ROWID | TIBEX_HOLIDAYS | 1 | 13 | 2 (0)| 00:00:01 |
| 21 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYS | 83 | | 1 (0)| 00:00:01 |
|* 22 | SORT JOIN | | 402 | 2412 | 2 (50)| 00:00:01 |
| 23 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYTRADINGCYCLEMA | 402 | 2412 | 1 (0)| 00:00:01 |
| 24 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGCYCLE | 2 | 26 | 2 (0)| 00:00:01 |
|* 25 | INDEX RANGE SCAN | XAK1TIBEX_TRADINGCYCLE | 2 | | 1 (0)| 00:00:01 |
| 26 | VIEW | index$_join$_024 | 80 | 1760 | 3 (34)| 00:00:01 |
|* 27 | HASH JOIN | | | | | |
| 28 | INDEX FAST FULL SCAN | XAK1TIBEX_TRADINGCYCLE | 80 | 1760 | 1 (0)| 00:00:01 |
| 29 | INDEX FAST FULL SCAN | XPKTIBEX_TRADINGCYCLE | 80 | 1760 | 1 (0)| 00:00:01 |
| 30 | TABLE ACCESS FULL | TIBEX_CYCLEPERIODMAP | 275 | 4950 | 5 (0)| 00:00:01 |
| 31 | TABLE ACCESS BY INDEX ROWID | TIBEX_CYCLEPERIODMAPOVER | 1 | 47 | 0 (0)| 00:00:01 |
|* 32 | INDEX UNIQUE SCAN | XPKTIBEX_CYCLEPERIODMAPOVER | 1 | | 0 (0)| 00:00:01 |
| 33 | TABLE ACCESS FULL | TIBEX_TRADINGPERIOD | 330 | 13860 | 7 (0)| 00:00:01 |
| 34 | LOAD AS SELECT | SYS_TEMP_0FD9D662C_FB42A6E1 | | | | |
| 35 | NESTED LOOPS | | 1 | 282 | 98 (5)| 00:00:02 |
|* 36 | FILTER | | | | | |
| 37 | NESTED LOOPS OUTER | | 1 | 278 | 98 (5)| 00:00:02 |
| 38 | NESTED LOOPS | | 1 | 267 | 97 (5)| 00:00:02 |
| 39 | MERGE JOIN CARTESIAN | | 1 | 254 | 96 (5)| 00:00:02 |
| 40 | NESTED LOOPS | | | | | |
| 41 | NESTED LOOPS | | 1 | 247 | 95 (5)| 00:00:02 |
| 42 | NESTED LOOPS | | 1 | 233 | 94 (5)| 00:00:02 |
| 43 | NESTED LOOPS | | 3 | 390 | 24 (17)| 00:00:01 |
|* 44 | HASH JOIN | | 1 | 116 | 23 (18)| 00:00:01 |
| 45 | NESTED LOOPS | | 1 | 95 | 21 (20)| 00:00:01 |
| 46 | NESTED LOOPS OUTER | | 31 | 2821 | 21 (20)| 00:00:01 |
| 47 | NESTED LOOPS | | 31 | 1364 | 21 (20)| 00:00:01 |
| 48 | VIEW | VW_NSO_1 | 1 | 26 | 18 (17)| 00:00:01 |
| 49 | SORT GROUP BY | | 1 | 113 | 18 (17)| 00:00:01 |
| 50 | NESTED LOOPS ANTI | | 1 | 113 | 17 (12)| 00:00:01 |
| 51 | NESTED LOOPS | | 1 | 99 | 16 (13)| 00:00:01 |
| 52 | NESTED LOOPS OUTER | | 1 | 92 | 15 (14)| 00:00:01 |
|* 53 | HASH JOIN | | 1 | 53 | 15 (14)| 00:00:01 |
|* 54 | HASH JOIN | | 8 | 336 | 9 (12)| 00:00:01 |
| 55 | NESTED LOOPS | | 40 | 1400 | 7 (15)| 00:00:01 |
| 56 | NESTED LOOPS OUTER | | 40 | 1240 | 7 (15)| 00:00:01 |
|* 57 | HASH JOIN | | 40 | 800 | 4 (25)| 00:00:01 |
|* 58 | INDEX RANGE SCAN | XPKTIBEX_DAYSTRADINGCYCLEMAP | 40 | 280 | 1 (0)| 00:00:01 |
| 59 | VIEW | index$_join$_044 | 80 | 1040 | 3 (34)| 00:00:01 |
|* 60 | HASH JOIN | | | | | |
| 61 | INDEX FAST FULL SCAN | XAK1TIBEX_TRADINGCYCLE | 80 | 1040 | 1 (0)| 00:00:01 |
| 62 | INDEX FAST FULL SCAN | XPKTIBEX_TRADINGCYCLE | 80 | 1040 | 1 (0)| 00:00:01 |
| 63 | VIEW PUSHED PREDICATE | | 1 | 11 | 1 (0)| 00:00:01 |
|* 64 | HASH JOIN | | 1 | 32 | 7 (29)| 00:00:01 |
| 65 | MERGE JOIN | | 3 | 57 | 4 (25)| 00:00:01 |
|* 66 | TABLE ACCESS BY INDEX ROWID| TIBEX_HOLIDAYS | 1 | 13 | 2 (0)| 00:00:01 |
| 67 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYS | 83 | | 1 (0)| 00:00:01 |
|* 68 | SORT JOIN | | 402 | 2412 | 2 (50)| 00:00:01 |
| 69 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYTRADINGCYCLEMA | 402 | 2412 | 1 (0)| 00:00:01 |
| 70 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGCYCLE | 2 | 26 | 2 (0)| 00:00:01 |
|* 71 | INDEX RANGE SCAN | XAK1TIBEX_TRADINGCYCLE | 2 | | 1 (0)| 00:00:01 |
|* 72 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGCYCLE | 1 | 4 | 0 (0)| 00:00:01 |
| 73 | VIEW | | 16 | 112 | 2 (0)| 00:00:01 |
| 74 | TABLE ACCESS FULL | SYS_TEMP_0FD9D662B_FB42A6E1 | 16 | 1216 | 2 (0)| 00:00:01 |
| 75 | TABLE ACCESS FULL | TIBEX_CYCLEPERIODMAP | 275 | 3025 | 5 (0)| 00:00:01 |
| 76 | TABLE ACCESS BY INDEX ROWID | TIBEX_CYCLEPERIODMAPOVER | 1 | 39 | 0 (0)| 00:00:01 |
|* 77 | INDEX UNIQUE SCAN | XPKTIBEX_CYCLEPERIODMAPOVER | 1 | | 0 (0)| 00:00:01 |
| 78 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGPERIOD | 1 | 7 | 1 (0)| 00:00:01 |
|* 79 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGPERIOD | 1 | | 0 (0)| 00:00:01 |
|* 80 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGMETHODENUM | 1 | 14 | 1 (0)| 00:00:01 |
|* 81 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGMETHODENUM | 1 | | 0 (0)| 00:00:01 |
| 82 | TABLE ACCESS BY INDEX ROWID | TIBEX_CYCLEPERIODMAP | 31 | 558 | 2 (0)| 00:00:01 |
|* 83 | INDEX SKIP SCAN | XPKTIBEX_CYCLEPERIODMAP | 31 | | 1 (0)| 00:00:01 |
| 84 | TABLE ACCESS BY INDEX ROWID | TIBEX_CYCLEPERIODMAPOVER | 1 | 47 | 0 (0)| 00:00:01 |
|* 85 | INDEX UNIQUE SCAN | XPKTIBEX_CYCLEPERIODMAPOVER | 1 | | 0 (0)| 00:00:01 |
|* 86 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGCYCLE | 1 | 4 | 0 (0)| 00:00:01 |
| 87 | VIEW | | 16 | 336 | 2 (0)| 00:00:01 |
| 88 | TABLE ACCESS FULL | SYS_TEMP_0FD9D662B_FB42A6E1 | 16 | 1216 | 2 (0)| 00:00:01 |
|* 89 | INDEX RANGE SCAN | XPKTIBEX_INSTRUMENTBOARDMAP | 36 | 504 | 1 (0)| 00:00:01 |
|* 90 | TABLE ACCESS BY INDEX ROWID | TIBEX_INSTRUMENTADMIN | 1 | 103 | 27 (0)| 00:00:01 |
|* 91 | INDEX RANGE SCAN | SYS_C001331991 | 35 | | 1 (0)| 00:00:01 |
|* 92 | INDEX UNIQUE SCAN | XPKTIBEX_INSTRACTIONENUM | 1 | | 0 (0)| 00:00:01 |
|* 93 | TABLE ACCESS BY INDEX ROWID | TIBEX_INSTRACTIONENUM | 1 | 14 | 1 (0)| 00:00:01 |
| 94 | BUFFER SORT | | 40 | 280 | 95 (5)| 00:00:02 |
|* 95 | INDEX RANGE SCAN | XPKTIBEX_DAYSTRADINGCYCLEMAP | 40 | 280 | 1 (0)| 00:00:01 |
| 96 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGCYCLE | 1 | 13 | 1 (0)| 00:00:01 |
|* 97 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGCYCLE | 1 | | 0 (0)| 00:00:01 |
| 98 | VIEW PUSHED PREDICATE | | 1 | 11 | 1 (0)| 00:00:01 |
|* 99 | HASH JOIN | | 1 | 32 | 7 (29)| 00:00:01 |
| 100 | MERGE JOIN | | 3 | 57 | 4 (25)| 00:00:01 |
|*101 | TABLE ACCESS BY INDEX ROWID | TIBEX_HOLIDAYS | 1 | 13 | 2 (0)| 00:00:01 |
| 102 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYS | 83 | | 1 (0)| 00:00:01 |
|*103 | SORT JOIN | | 402 | 2412 | 2 (50)| 00:00:01 |
| 104 | INDEX FULL SCAN | XPKTIBEX_HOLIDAYTRADINGCYCLEMA | 402 | 2412 | 1 (0)| 00:00:01 |
| 105 | TABLE ACCESS BY INDEX ROWID | TIBEX_TRADINGCYCLE | 2 | 26 | 2 (0)| 00:00:01 |
|*106 | INDEX RANGE SCAN | XAK1TIBEX_TRADINGCYCLE | 2 | | 1 (0)| 00:00:01 |
|*107 | INDEX UNIQUE SCAN | XPKTIBEX_TRADINGPERIOD | 1 | 4 | 0 (0)| 00:00:01 |
|*108 | HASH JOIN SEMI | | 1 | 331 | 6 (34)| 00:00:01 |
|*109 | VIEW | | 2 | 582 | 2 (0)| 00:00:01 |
| 110 | TABLE ACCESS FULL | SYS_TEMP_0FD9D662C_FB42A6E1 | 2 | 272 | 2 (0)| 00:00:01 |
| 111 | VIEW | VW_NSO_2 | 2 | 80 | 3 (34)| 00:00:01 |
| 112 | HASH GROUP BY | | 2 | 38 | 3 (34)| 00:00:01 |
| 113 | VIEW | | 2 | 38 | 2 (0)| 00:00:01 |
| 114 | TABLE ACCESS FULL | SYS_TEMP_0FD9D662C_FB42A6E1 | 2 | 272 | 2 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------------------------------------------------ -
Bad execution plans when using parameters, subquery and partition by
We have an issue with the following...
We have this table:
CREATE TABLE dbo.Test (
Dt date NOT NULL,
Nm int NOT NULL,
CONSTRAINT PK_Test PRIMARY KEY CLUSTERED (Dt)
This table can have data but it will not matter for this topic.
Consider this query (thanks Tom Phillips for simplifying my question):
declare @date as date = '2013-01-01'
select *
from (
select Dt,
row_number() over (partition by Dt order by Nm desc) a
from Test
where Dt = @date
) x
go
This query generates an execution plan with a clustered seek.
Our queries however needs the parameter outside of the sub-query:
declare @date as date = '2013-01-01'
select *
from (
select Dt,
row_number() over (partition by Dt order by Nm desc) a
from Test
) x
where Dt = @date
go
The query plan now does a scan followed by a filter on the date.
This is extremely inefficient.
This query plan is the same if you change the subquery into a CTE or a view (which is what we use).
We have this kind of setup all over the place and the only way to generate a good plan is if we use dynamic sql to select data from our views.
Is there any kind of solution for this?
We have tested this (with the same result) on SQL 2008R2, 2012 SP1, 2014 CU1.
Any help is appreciated.Hi Tom,
Parameter sniffing is a different problem. A query plan is made based on the value which may be really off in the data distribution. We do have this problem as well e.g. when searching for today's data when the statistics think the table only has yesterday's
data (a problem we have a lot involves the lack of sufficient amount of buckets in statistics objects).
This problem is different.
- It doesn't matter what the parameter value is.
- You can reproduce this example with a fresh table. I.e. without statistics.
- No matter what the distribution of data (or even if the statistics are correct), there is absolutely no case possible (in my example) where doing a scan followed by a filter should have better results than doing a seek.
- You can't change the behavior with hints like "option(recompile)" or "optimize for".
This problem has to do with the specific combination of "partition by" and the filter being done outside of the immediate query. Try it out, play with the code, e.g. move the where clause inside the subquery. You'll see what I mean.
Thanks for responding.
Michel -
After upgrading to Maverick, when I double click on the attachment I get this message "...could not be saved, because you cannot change the contents of that folder. Change the folder properties and try again, or try saving in a different location." It happens for all types of files.
Any suggestions as how to fix this?
I'm on a Mac OS X 10.9.3 with Thunderbird 24.5.0Thunderbird > preferences (I think on a mac) and under attachments set the folder
-
Unable to get the execution plan when using dbms_sqltune (11gR2)
Hi,
Database version: 11gR2
I have a user A that is granted privileges to execute dbms_sqltune.
I can create a task, excute it and run the report.
But, when I run the report I get the following error:
SQL> show user
USER is "A"
SQL> set long 10000 longchunksize 10000 linesize 200 pagesize 000
select dbms_sqltune.report_tuning_task(task_name => 'MYTEST') from dual;SQL>
GENERAL INFORMATION SECTION
Tuning Task Name : MYTEST
Tuning Task Owner : A
Workload Type : Single SQL Statement
Scope : COMPREHENSIVE
Time Limit(seconds): 1800
Completion Status : COMPLETED
Started at : 05/15/2013 11:53:22
Completed at : 05/15/2013 11:53:23
Schema Name: SYSMAN
SQL ID : gjm43un5cy843
SQL Text : SELECT SUM(USED), SUM(TOTAL) FROM (SELECT /*+ ORDERED */
SUM(D.BYTES)/(1024*1024)-MAX(S.BYTES) USED,
SUM(D.BYTES)/(1024*1024) TOTAL FROM (SELECT TABLESPACE_NAME,
SUM(BYTES)/(1024*1024) BYTES FROM (SELECT /*+ ORDERED USE_NL(obj
tab) */ DISTINCT TS.NAME FROM SYS.OBJ$ OBJ, SYS.TAB$ TAB,
SYS.TS$ TS WHERE OBJ.OWNER# = USERENV('SCHEMAID') AND OBJ.OBJ# =
TAB.OBJ# AND TAB.TS# = TS.TS# AND BITAND(TAB.PROPERTY,1) = 0 AND
BITAND(TAB.PROPERTY,4194400) = 0) TN, DBA_FREE_SPACE SP WHERE
SP.TABLESPACE_NAME = TN.NAME GROUP BY SP.TABLESPACE_NAME) S,
DBA_DATA_FILES D WHERE D.TABLESPACE_NAME = S.TABLESPACE_NAME
GROUP BY D.TABLESPACE_NAME)
ERRORS SECTION
- ORA-00942: table or view does not exist
SQL>
It seems there a missing privileg for dislaying the execution plan.
As a workaround, this is solved by granting select any dictionay (which I don't want) to the user A.
Does someone have an idea about what privilege is missing?
Kind Regards.Hi,
SELECT ANY DICTIONARY system privilege provides access to SYS schema objects only => which you are using as workaround
SELECT_CATALOG_ROLE provides access to all SYS views only.==> Safe option
SQL> grant SELECT ANY DICTIONARY to test;
Grant succeeded.
SQL> conn test/test
Connected.
SQL> select count(*) from sys.obj$;
COUNT(*)
13284
SQL> conn /as sysdba
Connected.
SQL> revoke SELECT ANY DICTIONARY from test;
Revoke succeeded.
SQL> grant SELECT_CATALOG_ROLE to test;
Grant succeeded.
SQL> conn test/test
Connected.
SQL> select count(*) from sys.obj$;
select count(*) from sys.obj$
ERROR at line 1:
ORA-00942: table or view does not existHTH -
First off, when firefox trys to auto update, it fails. It tells me to try and download the new version from mozilla's site. When I try to download the new version I get this: (C:\Users\John\AppData\Local\Temp could not be saved, because you cannot change the contents of that folder.)
This is the same message I have been getting when I try to download other things off the net. (When I use other browsers to download I dont have this problem)Please help.
It is getting worse
Adobe flash player is crashing. I already uninstalled and re installed the latest ver. Also it is hanging randomly.
Please help. -
"could not load any writer" when changing render settings?
When I change my render output settings from Quicktime Movie to something like H.264, I get an error saying "could not load any writer, adobe media encoder will now exit". Does anyone know how to fix this?
When I select Quicktime Movie then change the compression type to H.264, After Effects then tells me "for reliable output with H.264 compression, please choose it directly fro the Output Module..." which then puts me right back where I started with this posting.
Any suggestions?
Thanks!
Kristin.@Kevin: The MPEG stuff being defunct should not affect fresh installs. So it's definitely some other app "stealing" the CoDecs. In what order are you installing? Perhaps having Nero, some DVD-player software or something similar inbetween? Did you deactivate the products before re-installing? what formatting options did you choose?
@kristin: As Jonas said, check QT. In addition, I would attempt yet another re-install, but this time taking care to really manually survey the progress. I'm suspecting that some of your files never get overwritten, so the config issue remains in place and your modules don't show up. So deactivate the app, uninstall it, run the CS3 clean scripts. Before re-installing, check your Library/Application Support/Adobe directory and the Preferences directory. Rip out any pieces that look suspicious and may be related to After Effects or Premiere/Encore, in particular MediaCore. Furthermore, remove any installer logs and remnants in the respective directories (Library/Logs, library/Application Support/Adobe/Installers). The packages are recognizable by their icon and the logs have the respective names of the product.
Mylenium -
How to find out if SQL execution plan is changed proactively using job/grid
Hello,
Can you help me on How to find out if SQL execution plan is changed proactively using job/grid control?
Thank you..
-The answers so far are supposed to show ways how to see that a plan changed after the fact - that is not really proactive but that was the question.
A way to see a plan change proactively would be to create a SQL Plan Baseline for the SQL statement with the 'good old' plan and then watch DBA_SQL_PLAN_BASELINES for new rows with that SQL_HANDLE which would indicate that a new execution plan was computed - although not yet used.
Kind regards
Uwe Hesse
"Don't believe it, test it!"
http://uhesse.com -
Execution plan of a query changed
Dear Experts,
One of the SQL's running fine prior has a problem now. It just takes too long to execute. Tuning advisor recommends a profile setting with 55% benefit and no other recommendations.
Using profile hasn't helped much. I would like to check execution plan history of this SQL. Is there V$ view where this info gets populated in terms of hash values??
Thanks.See DBA_HIST_SQLSTAT for historic execution stats and get the plans from DBMS_XPLAN.DISPLAY_AWR.
e.g.
select sn.snap_id
, sn.end_interval_time
, st.module
, st.sql_id
, st.plan_hash_value
, rows_processed_delta rws
, executions_delta execs
, elapsed_time_delta elp
, cpu_time_delta cpu
, buffer_gets_delta gets
, iowait_delta io
from dba_hist_snapshot sn
, dba_hist_sqlstat st
where st.snap_id = sn.snap_id
and st.sql_id = '<sql_id>'
order by sn.snap_id desc; and
select * from table(dbms_xplan.display_awr('<sql_id>'));This AWR data depends on your AWR retention period - which is far too short at the default 8 days but requires more space for longer obviously - and whether the SQL is regularly in the top N.
Edited by: Dom Brooks on Jul 12, 2012 9:29 AM -
Planning Layout crashes when another excel is open
Hi All,
The planning layout crashes when another excel sheet is open other than BPS layout. It gives me following type of error:
In the initialization phase of the planning function you selected, the system found settings, which could possibly lead to problems and which are not immediately obvious. For example, it could be that the current selection conditions do not match the settings of a data slice.
Have anybody encountered this type of error before? Please reply ASAP as this is very critical issue being faced by the users.We follow up this issue with SAP and we got following reply from them:
it is a general problem from Excel, to be unable to work properly in
2 or more instances in parallel. The problem was already discussed with
Microsoft - the result was that there exist no solution for that. The
problem is a restriction due to the OLE functionality from Microsoft.
More information about you can find in note 176642.
My suggestions:
- Do not use Excel if you are using TA BPS0.
- Could you change the layout from Excel to ALV-Grid?
- It is possible to use Office Web Component (OWC)?
- Create a web interface based application using OWC in BPS_WB.
- see note 632333
Unfortunately I am not able to give you more support in this case - we
have no influence on the Excel Instance - it is an Microsoft issue. -
Force statement to use a given rule or execution plan
Hi!
We have a statement that in our production system takes 6-7 seconds to complete. The statement comes from our enterprise application's core code and we are not able to change the statement.
When using a RULE-hint (SELECT /*+RULE*/ 0 pay_rec...........) for this statement, the execution time is down to 500 milliseconds.
My question is: Is there any way to pin a execution plan to a given statement. I have started reading about outlines, which seems promising. However, the statement is not using bind-variables, and since this is core code in an enterprise application I cannot change that either. Is it possible to use outlines with such a statement?
Additional information:
When I remove all statistics for the involved tables, the query blows away in 500 ms.
The table tran_info_types has 61 rows and is a stable table with few updates
The table ab_tran_info has 1 717 439 records and is 62 MB in size.
The table query_result has 777 015 records and is 216 MB in size. This table is constantly updated/insterted/deleted.
The query below return 0 records as there is no hits in the table query_result.
This is the statement:
SELECT /*+ALL_ROWS*/
0 pay_rec, abi.tran_num, abi.type_id, abi.VALUE
FROM ab_tran_info abi,
tran_info_types ti,
query_result qr1,
query_result qr2
WHERE abi.tran_num = qr1.query_result
AND abi.type_id = qr2.query_result
AND abi.type_id = ti.type_id
AND ti.ins_or_tran = 0
AND qr1.unique_id = 5334549
AND qr2.unique_id = 5334550
UNION ALL
SELECT 1 pay_rec, abi.tran_num, abi.type_id, abi.VALUE
FROM ab_tran_info abi,
tran_info_types ti,
query_result qr1,
query_result qr2
WHERE abi.tran_num = qr1.query_result
AND abi.type_id = qr2.query_result
AND abi.type_id = ti.type_id
AND ti.ins_or_tran = 0
AND qr1.unique_id = 5334551
AND qr2.unique_id = 5334552;Here is the explain plan with statistics:
Plan
SELECT STATEMENT HINT: ALL_ROWSCost: 900 Bytes: 82 Cardinality: 2
15 UNION-ALL
7 NESTED LOOPS Cost: 450 Bytes: 41 Cardinality: 1
5 NESTED LOOPS Cost: 449 Bytes: 1,787,940 Cardinality: 59,598
3 NESTED LOOPS Cost: 448 Bytes: 19,514,824 Cardinality: 1,027,096
1 INDEX RANGE SCAN UNIQUE TRADEDB.TIT_DANIEL_2 Search Columns: 1 Cost: 1 Bytes: 155 Cardinality: 31
2 INDEX RANGE SCAN UNIQUE TRADEDB.ATI_DANIEL_7 Search Columns: 1 Cost: 48 Bytes: 471,450 Cardinality: 33,675
4 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 11 Cardinality: 1
6 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 11 Cardinality: 1
14 NESTED LOOPS Cost: 450 Bytes: 41 Cardinality: 1
12 NESTED LOOPS Cost: 449 Bytes: 1,787,940 Cardinality: 59,598
10 NESTED LOOPS Cost: 448 Bytes: 19,514,824 Cardinality: 1,027,096
8 INDEX RANGE SCAN UNIQUE TRADEDB.TIT_DANIEL_2 Search Columns: 1 Cost: 1 Bytes: 155 Cardinality: 31
9 INDEX RANGE SCAN UNIQUE TRADEDB.ATI_DANIEL_7 Search Columns: 1 Cost: 48 Bytes: 471,450 Cardinality: 33,675
11 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 11 Cardinality: 1
13 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 11 Cardinality: 1 Here is the execution plan when I have removed all statistics (exec DBMS_STATS.DELETE_TABLE_STATS(.........,..........); )
Plan
SELECT STATEMENT HINT: ALL_ROWSCost: 12 Bytes: 3,728 Cardinality: 16
15 UNION-ALL
7 NESTED LOOPS Cost: 6 Bytes: 1,864 Cardinality: 8
5 NESTED LOOPS Cost: 6 Bytes: 45,540 Cardinality: 220
3 NESTED LOOPS Cost: 6 Bytes: 1,145,187 Cardinality: 6,327
1 TABLE ACCESS FULL TRADEDB.TRAN_INFO_TYPES Cost: 2 Bytes: 104 Cardinality: 4
2 INDEX RANGE SCAN UNIQUE TRADEDB.ATI_DANIEL_6 Search Columns: 1 Cost: 1 Bytes: 239,785 Cardinality: 1,547
4 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 26 Cardinality: 1
6 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 26 Cardinality: 1
14 NESTED LOOPS Cost: 6 Bytes: 1,864 Cardinality: 8
12 NESTED LOOPS Cost: 6 Bytes: 45,540 Cardinality: 220
10 NESTED LOOPS Cost: 6 Bytes: 1,145,187 Cardinality: 6,327
8 TABLE ACCESS FULL TRADEDB.TRAN_INFO_TYPES Cost: 2 Bytes: 104 Cardinality: 4
9 INDEX RANGE SCAN UNIQUE TRADEDB.ATI_DANIEL_6 Search Columns: 1 Cost: 1 Bytes: 239,785 Cardinality: 1,547
11 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 26 Cardinality: 1
13 INDEX UNIQUE SCAN UNIQUE TRADEDB.QUERY_RESULT_INDEX Search Columns: 2 Bytes: 26 Cardinality: 1 Our Oracle 9.2 database is set up with ALL_ROWS.
Outlines: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/outlines.htm#13091
Cursor sharing: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3696883368520Hi!
We are on Oracle 9iR2, running on 64-bit Linux.
We are going to upgrade to Oracle 10gR2 in some months. Oracle 11g is not an option for us as our application is not certified by our vendor to run on that version.
However, our performance problems are urgent so we are looking for a solution before we upgrade as we are not able to upgrade before we have done extensive testing which takes 2-3 months.
We have more problem sql's than the one shown in this post. I am using the above SQL as a sample as I think we can solve many other slow running SQL's if we solve this one.
Is the SQL Plan management an option on Oracle 9i and/or Oracle 10g? -
Hello ,
I am working on oracle 11g R2 on AIX.
One query was performing good around 20 sec. but suddenly it took more then 15 min.
We check that the sql executoin plan changes , it showing that order of operation changed like order of using indexes is different.
Now the new plan is not good.
we want to force the old plan of sql to use in future.
I read about sql plan management , it shows a manual method to create baseline and evolve the all plan. In one texample we found that
first query execution plan was created using with out index and then with index So, second plan was good and accepted.
But in this case we do not need to change any thing ,query is performing bad may be becasue changes order of operation ..
One other way to use hint , but for this we need to change sqls , which is not possiable in production now.
The issue is
For this we need to run the sql again and oracle may not create plan like old one.So we will not be having old good plan to accept.
All 2 execution plan are already in cache .
I am looking for a way using that we can set sql plan hash value ( of good plan) or any other id of that sql plan to force to use that plan only.
any idea how to do it ..Stored Outlines are deprecated.
OP:
To fix a specific plan you have two choices:
1. SQL Plan Baselines - assuming the "good" plan is in AWR still then the steps are along the lines of load old plan from AWR into sql tuning set using DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY and DBMS_SQLTUNE.LOAD_SQLSET then load plans from sqlset into sql plan baseline using DBMS_SPM.LOAD_PLANS_FROM_SQLSET.
2. Using SQL Profiles to fix the outline hints - so similar to a stored outline but using the sql profile mechanism - using the coe_xfr_sql_profile.sql script, part of an approach in Oracle support doc id 215187.1
But +1 for Nikolay's recommendation of understanding whether there is a root cause to this problem instability (plan instability being "normal", but flip flopping between "good" and "bad" being a problem). Cardinality feedback is an obvious possible influence, different peeked binds another, stat changes, etc. -
Out of the box execution plan for Payables EBS 11.5.10
Has anyone else experienced performance issues with the out of the box execution plan for the Payables subject area for Oracle EBS 11.5.10? Our incremental ETL for this particular subject area is taking 8+ hours. I understand that there are several factors involved with performance and that there are a lot of AP transactions, but this is ridiculous for a nightly incremental ETL job.
In particular it is the SDE_ORA_APTransactionFact_Payment task that is taking forever. This query appears to have extremely high cost (see explain plan below). Has anyone been successful in rewriting or changing this query?
SELECT STATEMENT ALL_ROWSCost: 586,953 Bytes: 16,550 Cardinality: 50
13 NESTED LOOPS OUTER Cost: 586,953 Bytes: 16,550 Cardinality: 50
10 NESTED LOOPS Cost: 586,952 Bytes: 15,800 Cardinality: 50
7 HASH JOIN Cost: 468,320 Bytes: 11,693,526 Cardinality: 59,358
5 HASH JOIN Cost: 429,964 Bytes: 9,200,490 Cardinality: 59,358
3 HASH JOIN Cost: 366,009 Bytes: 7,740,544 Cardinality: 60,473
1 TABLE ACCESS FULL TABLE AP.AP_AE_LINES_ALL Cost: 273,240 Bytes: 15,212,604 Cardinality: 230,494
2 TABLE ACCESS FULL TABLE AP.AP_INVOICE_PAYMENTS_ALL Cost: 45,211 Bytes: 715,512,860 Cardinality: 11,540,530
4 TABLE ACCESS FULL TABLE AP.AP_PAYMENT_SCHEDULES_ALL Cost: 39,003 Bytes: 309,648,420 Cardinality: 11,468,460
6 TABLE ACCESS FULL TABLE AP.AP_CHECKS_ALL Cost: 28,675 Bytes: 130,126,920 Cardinality: 3,098,260
9 TABLE ACCESS BY INDEX ROWID TABLE AP.AP_INVOICES_ALL Cost: 2 Bytes: 119 Cardinality: 1
8 INDEX UNIQUE SCAN INDEX (UNIQUE) AP.AP_INVOICES_U1 Cost: 1 Cardinality: 1
12 TABLE ACCESS BY INDEX ROWID TABLE PO.PO_HEADERS_ALL Cost: 1 Bytes: 15 Cardinality: 1
11 INDEX UNIQUE SCAN INDEX (UNIQUE) PO.PO_HEADERS_U1 Cost: 1 Cardinality: 1Hi Srini, All,
Thanks for the reply.
The payables documentation (i.e. User Guide) discusses about options that could be used in implementing EFT. However, if possible, we would like suggestions on what would be the better ways to implement EFT (US bank) using either XML or text formats. We would also prefer not using e-commerce gateway or EDI.
Thanks in advance.
MM
Maybe you are looking for
-
Hi. My 6822 wont complete the sync process. PC Suite tells me the sync has finished but the phone just dislays "quitting sync" forever. I have to stop it by presseing the end call button. Next time I sync the phone creates duplicates in Outlook (pres
-
Hana and data services are not connected.
I was following these steps. As a result, there is a connection error. Please tell us why. 1. Log on to HANA Studio 2. File> Import 3. Expand the Infomation Modeler node. 4. Choose Source Objects. 5. Choose Next. 6. Select the target system where you
-
How do I do I stop System Preferences from Launching in Mountain Lion when I switch on?
Since I upgraded to Mountain Lion, system preferences opens every time although I quit it when shutting down and the box is unchecked for reopen windows when I shut down and I have ticked the box in General to close windows when quitting an applicati
-
Small screen size in FCE?
I only have this problem when I use footage that a co-worker FTP's to me. It doesn't happen when I capture from my camera. The actual video dimension is much smaller than it should be. It is surrounded by a black box (see screen shot). How do I get t
-
Creating DAS or SAN Disk Partitions for ASM
Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux (http://docs.oracle.com/cd/E11882_01/install.112/e24321/oraclerestart.htm#CHDBJGEB) *3.6.3 Step 2:* Creating DAS or SAN Disk Partitions for Oracle Automatic Storage Management In orde