CBO not picking correct indexes or doing Full Scans

Database version - 10.2.0.4
OS : Solaris 5.8
Storage: SAN
Application : PeopleSoft Financials
DB size : 450 gb
DB server : 12 CPU ( 900 Mghz each ), 36 GB RAM
ASMM - sga_target_size = 5 gb
Locally managed tablespaces - MANUAL
- db_file_multiblock_read_count - not set explicitly in spfile ( implicitly defaulted to 128 )
- other optimizer related parameters are set to default
- system_statistics - CPUSPEEDNW=456.282722513089, IOSEEKTIM =10, IOTFRSPEED=4096     
- dictionary object system stats were last gather in Nov 09
- stats on schema objs are gathered every night using custom script, but I have to say there are some histograms on some tables which were gathered by PS admins
begin
dbms_stats.gather_schema_stats(
ownname=> 'SCHEMANM' ,
cascade=> DBMS_STATS.AUTO_CASCADE,
estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE,
degree=> 10,
no_invalidate=> DBMS_STATS.AUTO_INVALIDATE,
granularity=> 'AUTO',
method_opt=> 'FOR ALL COLUMNS SIZE 1',
options=> 'GATHER STALE');
end;
Details :
We are experiencing erratic database performance. It was upgraded from 9i to 10g along with PS software upgrade. A job that runs on one day in 12 hrs(that is high in itself) would take more than 24 hrs another day.
We have Test and Staging envs on other servers which do not have performance issues of production magnitude. The test, staging dbs are clones of prod, created by ftp'ing files from one location to another, not sure if that makes any difference but just pointing out.
On Prod db some symptoms which baffle me are :
1) sql executing for over 40 minutes, check the plan and it is using an "incorrect" index, idx1. Hint sql with "correct" index, idx2, and it runs in few seconds. result set <400 rows. Cost with hint with idx2 is HIGHER. This scenario is still understandable as CBO is likely to pick a lower cost.
- But why is there so much discrepancy in cost and response time?
- what is influencing the CBO to pick an index which is obviously not the fastest response time?
2) sql plan shows FTS , execution time , runs forever . But a hint with index in this case shows the cost is LOWER and response time is in seconds, so why is CBO not even evaluating this index path? Because as I understand the CBO, it will always pick the lower cost plan.
What is influencing the CBO. Is it system stats? or any other database parameter? or the hardware ? the large SGA?? histogram ?? Stats gathering?? is there is any known issue with DBMS_STATS.AUTO_SAMPLE_SIZE and cardinaility?
Where should I put my focus?
What am I looking for ?
I do have Jonathan Lewis's Cost-Based Oracle Fundamentals which I have just started so perhaps I will be enlightened but while I read it, it would be of immense help to get some advice from forum gurus.
At this time I am not posting any exec plan or code, but I can do so if required.
Thanks,
JC

Picking up just a couple of points - the ones about: why can performance change so much from one day to the next, and how can the optimizer miss a plan which (when hinted) shows a lower cost.
NOTE: These are only suggestions that may allow you to look at critical code and recognise the pattern of behaviour
Performance change:
You are using "gather stale" which means tables won't get new statistics is the volume of change since the last collection is "small". But peoplesoft tables can be big, so some tables may need a lot of data to change (which might take several days or weeks) before they get new stats. The 10g optimizer is able to compare the high-values stored with the predicate values supplied in queries, and decide that since the predicate is higher than the known highest value, it should scale down its estimates of data returned. After a few days when the stats haven't changed, the optimizer suddenly gets to the point where the estimated data size is much too small and the plan changes to something that you can see is bad. The typical example here is a date column that increases with time, and a query on "recent data" - the optimizer basically says: "you want 9th Feb - the high value says 28th Jan, there's virtually no data". Keeping date and sequence-based high-values up to date is important. (See dbms_stats.set_column_stats).
Lower cost plans available:
Sometimes this is a bug. Sometimes it's an unlucky side effect. When a query has a large number of tables in a single query block, the optimizer can only examine a limited subset of the possible join orders (for example, a 10-table join has over 3million join orders, and the default limit is 2,000 checked). Because of this limit, Oracle starts working through a few joins orders in a methodical manner, then does a "big jump" to a different set of join orders where it checks a few more join orders, then does another "big jump". It may be that it never gets to your nice plan with the lower cost because it doesn't have time. However, by putting in the hint, you may make some of the orders the optimizer would have examined drop out of the "methodical list" - so it examines a few more in one sequence, or possibly "jumps" to a different sequence that it would not othewise have reached. (I wrote a related blog item some time ago that might make this clearer, even though it's not about exactly the same phenomenon: http://jonathanlewis.wordpress.com/2006/11/03/table-order/ ).
Your recent comment about dynamic sampling is correct, by the way - by default (which for your version is is level 2 as a system parameter) it will only apply for tables which don't have any statistics. It's only for higher levels, or when explicitly hinted for tables, that it can apply to tables with existing statistics.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • CBO picking incorrect indexes or doing Full Scans ( table/indexes)

    Database version - 10.2.0.4
    OS : Solaris 5.8
    Storage: SAN
    Application : PeopleSoft Financials
    DB size : 450 gb
    DB server : 12 CPU ( 900 Mghz each ), 36 GB RAM
    ASMM - sga_target_size = 5 gb
    Locally managed tablespaces - MANUAL
    - db_file_multiblock_read_count - not set explicitly in spfile ( implicitly defaulted to 128 )
    - other optimizer related parameters are set to default
    - system_statistics - CPUSPEEDNW=456.282722513089, IOSEEKTIM =10, IOTFRSPEED=4096     
    - dictionary object system stats were last gather in Nov 09
    - stats on schema objs are gathered every night using custom script, but I have to say there are some histograms on some tables which were gathered by PS admins
    begin
    dbms_stats.gather_schema_stats(
    ownname=> 'SCHEMANM' ,
    cascade=> DBMS_STATS.AUTO_CASCADE,
    estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE,
    degree=> 10,
    no_invalidate=> DBMS_STATS.AUTO_INVALIDATE,
    granularity=> 'AUTO',
    method_opt=> 'FOR ALL COLUMNS SIZE 1',
    options=> 'GATHER STALE');
    end;
    Details :
    We are experiencing erratic database performance. It was upgraded from 9i to 10g along with PS software upgrade. A job that runs on one day in 12 hrs(that is high in itself) would take more than 24 hrs another day.
    We have Test and Staging envs on other servers which do not have performance issues of production magnitude. The test, staging dbs are clones of prod, created by ftp'ing files from one location to another, not sure if that makes any difference but just pointing out.
    On Prod db some symptoms which baffle me are :
    1) sql executing for over 40 minutes, check the plan and it is using an "incorrect" index, idx1. Hint sql with "correct" index, idx2, and it runs in few seconds. result set <400 rows. Cost with hint with idx2 is HIGHER. This scenario is still understandable as CBO is likely to pick a lower cost.
    - But why is there so much discrepancy in cost and response time?
    - what is influencing the CBO to pick an index which is obviously not the fastest response time?
    2) sql plan shows FTS , execution time , runs forever . But a hint with index in this case shows the cost is LOWER and response time is in seconds, so why is CBO not even evaluating this index path? Because as I understand the CBO, it will always pick the lower cost plan.
    What is influencing the CBO. Is it system stats? or any other database parameter? or the hardware ? the large SGA?? histogram ?? Stats gathering?? is there is any known issue with DBMS_STATS.AUTO_SAMPLE_SIZE and cardinaility?
    Where should I put my focus?
    What am I looking for ?
    I do have Jonathan Lewis's Cost-Based Oracle Fundamentals which I have just started so perhaps I will be enlightened but while I read it, it would be of immense help to get some advice from forum gurus.
    At this time I am not posting any exec plan or code, but I can do so if required.
    Thanks,
    JC

    I would like to re-renter this to Database-general Forum as I have not received any response yet. I did not find an option to move so I marked this as answered and will re-enter in the other forum. Hope that's ok.
    Thanks,
    JC

  • Webi does not pick correct Data

    Hi Guys,
    I have a webi. The Universe for the Webi is based on  Bex Query. I see correct Data in Bex Query but when I create a webi report it does not pick correct data.
    I have checked following points already:-
    1] No Resstriction at Query Level
    2] No restriction at Universe Level
    3] No Filters/ Restriction at Webi Level.
    Can anyone suggest whats happening?
    Regards

    Hi Ray,
    It happens sometimes that data gets aggregated over all the dimension objects present in the 'Available Objects' section in webi.
    Try to pull only the characteristics present in the row section of the bex query say 'X' and measure in the column section of bex query say 'Y' into the results pane in the edit query window in webi.Then run the report and check.
    This will give you the idea about aggregation.
    Regards
    Vineeta

  • Profit center not picking correctly in PO from sales order

    Hi Experts,
    Profit center is not picking correctly.. in PO
    In material master Profit center is configured as XXXX
    We have raised a sales order for the same material with two line items (e.g) 1500 kgs & 1600 kgs and profit center has been changed in the sales order to YYYY
    There is one purchase requistion for the same material with two line items
    But  we have raised two purchase order for each line item in which the same sales order is linked to these two purchase order.
    In the first PO , for the first line item in sales order ie., 1500 kgs profit center is picked from the sales order ie, XXXX which is correct but  in the second PO, for the second line item in sales order ie., 1600 kgs profit center is picking as YYYY ie which is configured in material master.
    What could be reason ? Help  in this regard will be highly appreciated.
    Thanks in advance
    Narayanan

    Hi Narayan
    Check the Account assignment in the 2nd PO.. Does it have E as Acct Assgn Category?
    It should have sales order as the account assignment... If yes, then it must pick up PC from the sales order...
    Try to put a deletion flag to this PO and create a new one, if possible... You would come to know if some one has changed the PC
    BR,Ajay M

  • In Mail Settings Lookup, my outgoing server is not listed correctly.  How does it get changed

    In Mail Settings Lookup, my outgoing server is not listed correctly.  How does it get changed

    Yes, how does it get changed in the online "Mail Settings Lookup"  It is wrong there, but right in my mail preferences.  My Charter Account is locked on my computer.

  • Why my query not using any index but doing a FULL TABLE SCAN

    Hi,
    My EXPLAIN PLAN output is
    Plan hash value: 1163866984                                                                                                                                                                                                                                                                                 
    | Id  | Operation               | Name              | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                                                                                                                                                                                       
    |   0 | SELECT STATEMENT        |                   |   774 |   159K|       | 40847   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  1 |  FILTER                 |                   |       |       |       |            |          |                                                                                                                                                                                                       
    |   2 |   SORT GROUP BY         |                   |   774 |   159K|       | 40847   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  3 |    HASH JOIN            |                   | 77337 |    15M|  9744K| 40843   (2)| 00:08:11 |                                                                                                                                                                                                       
    |*  4 |     HASH JOIN           |                   | 77337 |  8836K|  5896K| 20987   (2)| 00:04:12 |                                                                                                                                                                                                       
    |*  5 |      HASH JOIN          |                   | 77337 |  4984K|       |  9292   (3)| 00:01:52 |                                                                                                                                                                                                       
    |*  6 |       HASH JOIN         |                   | 24991 |   951K|       |  3349   (3)| 00:00:41 |                                                                                                                                                                                                       
    |*  7 |        TABLE ACCESS FULL| IDS_TXNIDNUMBERS  | 24991 |   683K|       |  2328   (3)| 00:00:28 |                                                                                                                                                                                                       
    |   8 |        TABLE ACCESS FULL| IDS_TXNDEMDATAMAP |  2419K|    25M|       |  1006   (3)| 00:00:13 |                                                                                                                                                                                                       
    |   9 |       TABLE ACCESS FULL | IDS_IDNUMBERS     |  7435K|   191M|       |  5903   (2)| 00:01:11 |                                                                                                                                                                                                       
    |  10 |      TABLE ACCESS FULL  | IDS_DEMDATA       |  2583K|   125M|       |  3683   (5)| 00:00:45 |                                                                                                                                                                                                       
    |  11 |     TABLE ACCESS FULL   | IDS_TXN           |  2583K|   231M|       |  6403   (1)| 00:01:17 |                                                                                                                                                                                                       
    -----------------------------------------------------------------------------------------------------  All my 5 tables IDS_TXNIDNUMBERS, IDS_TXNDEMDATAMAP, IDS_IDNUMBERS,IDS_DEMDATA, IDS_TXN has indexes in relevant columns. Is it cause less time so CBO is not using the indexes.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Please be polite when responding to my queries. If you find these questions not to your standard, stay away from them. This is an open forum and I have got my full rights to ask questions.Unsure, what wrong did you find in SB's reply. I find those links perfectly knowledgeable. The question of having so many unanswered questions probably pricked you a little too much. But that, IMO, is a legitimate question, to be asked to a User who even after being associated with OTN for over an year has 100% record of not getting an answer.
    For your original question, you will have to provide more details to allow people to answer you.
    You must read {message:id=3292438} and post the mentioned details. People do not carry a Crystal Ball to identify the problem merely by reading few lines of Problem description and Explain plans. Do not make people guess, provide appropriate details, to help them Help "You".

  • Color picker does not pick correct colors

    I have a Samsung Galaxy Note 10.1 with pre-installed PS Touch. Has anyone else noticed how the color picker doesn't always pick correct colors? In my case, it picks a slightly darker color than the source color. I wanted to upgrade to version 1.3 to resolve this, but cannot find any upgrade option anywhere. Please help!

    This screenshot is of a normal layer at opacity 100%. I first did a uniform color fill, then sampled the color. Every area of color, therefore, ought to be exactly the same, without any slight variation whatsoever.
    The two brushstrokes to the left are done with the brush hardness set at 20%, with no pressure related controls, the left-most one set at 20%opacity, and the one to the right of it set to 100% opacity.
    The two brushmarks in the middle are done with brush hardness set to 100%, again, no pressure related controls, the leftward one set at 20% opacity, the right at 100 %.
    The two to the right are again done with 100% brush hardness, but this time, pressure related opacity control has been enabled. The left is at 20% opacity, the right at 100%.
    As you can see, the center of each brushstroke seems to have thecorrect color. So I agree with georg_maximus. It appears that this issue is an opacity related one, rather than a color picker problem.

  • Startup command not picking correct pfile

    Hi Guys,
    I am facing a problem. Whenever I try to start oracle on my Linux machine I get the foillowing error:
    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/home/oracle/oracle/product/10.2.0/db_1/dbs/initARIES.ora'
    Actually the pfile mentioned is not the correct one. I do not know where it is taking the path from. I had to start using the following command:
    startup pfile=/home/oracle/oracle/product/10.2.0/db_1/admin/aries/pfile/init.ora.110200612140
    Please provide me some way that I need not to mention the full path of pfile everytime.
    Thanks

    You can also create the initARIES.ora file in the dbs directory (the database is searching there by default) and use the IFILE parameter to point to the file you actually want to use.
    It seems the file you currently using is the one created during installation. Doesn't you have an SPFILE??? Using an SPFILE has some advantages (faster startup, change parameter using alter statement). You can create one via create SPFILE xxx from PFILE. If you place it in the dbs directory oracle should find it automatically. Again no need to pfile in the startup command.

  • Oracle not using correct index

    Hi,
    I have a fact table (a big table) and a dimension table representing dates.
    My query is
    select fdat.*, dd.dim_date from fdat_bitmap fdat, dim_dates dd where
    fdat.dim_date_id = dd.dim_date_id
    and dd.dim_date > TO_DATE('2011-12-20 00:00:00' , 'YYYY-MM-DD HH24:MI:SS');
    and the corresponding plan is:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 76M| 9173M| 709K (1)| 02:21:51 |
    |* 1 | HASH JOIN | | 76M| 9173M| 709K (1)| 02:21:51 |
    |* 2 | INDEX FAST FULL SCAN| UI_DD_DATES_ID | 6951 | 97314 | 8 (0)| 00:00:01 |
    | 3 | TABLE ACCESS FULL | FDAT_BITMAP | 198M| 20G| 708K (1)| 02:21:39 |
    Predicate Information (identified by operation id):
    1 - access("FDAT"."DIM_DATE_ID"="DD"."DIM_DATE_ID")
    2 - filter("DD"."DIM_DATE">TO_DATE(' 2011-12-20 00:00:00', 'syyyy-mm-dd
    hh24:mi:ss'))
    17 rows selected
    When I change the query to:
    select fdat.*, dd.dim_date from fdat_bitmap fdat, dim_dates dd where
    fdat.dim_date_id = dd.dim_date_id
    and fdat.dim_date_id > 20111220;
    Explain plan changes to:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 390K| 46M| 43958 (1)| 00:08:48 |
    | 1 | MERGE JOIN | | 390K| 46M| 43958 (1)| 00:08:48 |
    | 2 | TABLE ACCESS BY INDEX ROWID | FDAT_BITMAP | 390K| 41M| 43948 (1)| 00:08:48 |
    | 3 | BITMAP CONVERSION TO ROWIDS| | | | | |
    |* 4 | BITMAP INDEX RANGE SCAN | I_FDATB_DIM_DID | | | | |
    |* 5 | SORT JOIN | | 6991 | 97874 | 9 (12)| 00:00:01 |
    |* 6 | INDEX FAST FULL SCAN | UI_DD_DATES_ID | 6991 | 97874 | 8 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    4 - access("FDAT"."DIM_DATE_ID">20111220)
    filter("FDAT"."DIM_DATE_ID">20111220)
    5 - access("FDAT"."DIM_DATE_ID"="DD"."DIM_DATE_ID")
    filter("FDAT"."DIM_DATE_ID"="DD"."DIM_DATE_ID")
    6 - filter("DD"."DIM_DATE_ID">20111220)
    22 rows selected
    My question is why the first query not resulting in the plan similar to second one ? How can make it come with plan similar to the second one without changing the query ?
    Thanks,
    -Rakesh

    user12257218 wrote:
    My query is
    select fdat.*, dd.dim_date from fdat_bitmap fdat, dim_dates dd where
    fdat.dim_date_id = dd.dim_date_id
    and dd.dim_date > TO_DATE('2011-12-20 00:00:00' , 'YYYY-MM-DD HH24:MI:SS');When I change the query to:
    select fdat.*, dd.dim_date from fdat_bitmap fdat, dim_dates dd where
    fdat.dim_date_id = dd.dim_date_id
    and fdat.dim_date_id > 20111220;My question is why the first query not resulting in the plan similar to second one ? How can make it come with plan similar to the second one without changing the query ?
    To a very large extent this is because the two queries are not logically equivalent - unless you have a constraint in place that enforces the rule that:
    dd.dim_date_id > 20111220 if, and only if, dd.dim_date > TO_DATE('2011-12-20 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')
    A constraint like: (dim_date_id = to_number(to_char(dim_date,'yyyymmdd'))) might help - provided both columns also have NOT NULL declarations (or "is not null" constraints), and provided that that's appropriate for the way your application works.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Author: <b><em>Oracle Core</em></b>

  • APP not picking correct numbers

    Hi,
    I assigned one number range (eg: 100 to 200) for two document types ZP and ZV.
    While running the payment program the system is picking the numbers differently.
    Eg:
    when i run payment run on 01.04.2007 the system is picking number ranges 100,101,102,103,105,106,108 etc.
    when i run payment run on 02.04.2007 the system is picking number ranges 104,107etc.
    the numbers 104 and 107 is not picking in the first payment run. why it is happenning
    this is the issue of client.
    REQUIRE URGENT SOLUTION
    Rgds
    sunfico

    Hi,
    Have a talk with your basis consultant for buffering number range's. For FI it should be 1!!
    Paul

  • Defender allowing omiga-plus to change browser not picked up on 3.5 hours scan

    have problems with browsers being taken over but not picked up by defender cant seem to talk to anyone at microsoft

    Harshit DBA india wrote:
    I have already set memory_target and memory_max_target with enough space. but face same issue
    SQL> show parameter memory
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    memory_max_target big integer 12864M
    memory_target big integer 12864M
    shared_memory_address integer 0Hello,
    That's what I am intending to say. When you have set MEMORY_TARGET and SGA_MAX_SIZE, Oracle gives preference to MEMORY_TARGET. Which is why the changes you make to SGA_MAX_SIZE would not be seen after you bounce the database.
    Refer this What if I set MEMORY_MAX_TARGET and SGA_MAX_SIZE both?
    If the reply seems to be helpful, then consider closing the thread by providing appropriate points.

  • F.07 does not pick correct customer balance

    I have two customer accounts for which upon running the transaction F.07 ,in test mode , it is returning the cumulative balance from last year( the top line in FD10N) . But in our test system , it is giving the correct balance . Test system was refreshed before year-end.
    Why is it not returning this year's balance in Production?
    Thanks
    Edited by: MN on Feb 7, 2010 8:33 PM

    Hi,
    check for any authorization issues.
    Regards

  • CBO not picking the right execution plan

    Database: Oracle 9.2.0.6 EE
    OS:Solaris 9
    I am trying to tune a query that is generated via Siebel Analytics. I am seeing a behaviour which is puzzling me but hopefully would be 'elementary' for someone like JPL.
    The query is based on a total of 7 tables. If I comment out any 2 dimension tables, the query picks up the right index on the fact table. However, the moment I add another table to the query, the plan goes awry.
    The query with 5 tables is as below:
    select count(distinct decode( T30256.HEADER_FLG , 'N' , T30256.ROW_WID ) ) as c1,
    T352305.DAY_DT as c2,
    case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end  as c3,
    T352305.ROW_WID as c5
    from
                   W_PRODUCT_D T30955,
                   W_PRDATTRNM_D T44643,                         
                   W_DAY_D T352305,                 
                   W_ORDERITEM_F T30256,              
                   W_PRDATTR_D T40081                         
    where  ( T30955.ROW_WID = T44643.ROW_WID
    and T30256.LAST_UPD_DT_WID = T352305.ROW_WID
    and T30256.PROD_ATTRIB_WID = T40081.ROW_WID 
    and T30256.PROD_WID = T30955.ROW_WID
    and T30955.PROD_NAME = 'Mobile Subscription'
    and (case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end  in ('BT150BB-18M', 'BT250BB-18M', 'BT50BB-18M', 'BT600BB-18M'))
    and T352305.DAY_DT between TO_DATE('2008-09-27' , 'YYYY-MM-DD') - 7 and TO_DATE('2008-09-27' , 'YYYY-MM-DD') - 1
    group by
    T352305.ROW_WID, T352305.DAY_DT,
    case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end
    ;And the execution plan is as below:
    | Id  | Operation                        |  Name                | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                 |                      |   269 | 25824 | 18660   (3)|
    |   1 |  SORT GROUP BY                   |                      |   269 | 25824 | 18660   (3)|
    |   2 |   NESTED LOOPS                   |                      |   269 | 25824 | 18658   (3)|
    |   3 |    NESTED LOOPS                  |                      |  6826 |   579K|  4734   (3)|
    |   4 |     MERGE JOIN CARTESIAN         |                      |     8 |   544 |     6  (17)|
    |   5 |      NESTED LOOPS                |                      |     1 |    54 |     4  (25)|
    |   6 |       TABLE ACCESS BY INDEX ROWID| W_PRODUCT_D          |     1 |    37 |     3  (34)|
    |*  7 |        INDEX RANGE SCAN          | W_PRODUCT_D_M2       |     1 |       |     2  (50)|
    |   8 |       TABLE ACCESS BY INDEX ROWID| W_PRDATTRNM_D        |     1 |    17 |     2  (50)|
    |*  9 |        INDEX UNIQUE SCAN         | W_PRDATTRNM_D_P1     |     1 |       |            |
    |  10 |      BUFFER SORT                 |                      |     8 |   112 |     4   (0)|
    |  11 |       TABLE ACCESS BY INDEX ROWID| W_DAY_D              |     8 |   112 |     3  (34)|
    |* 12 |        INDEX RANGE SCAN          | W_DAY_D_M39          |     8 |       |     2  (50)|
    |  13 |     TABLE ACCESS BY INDEX ROWID  | W_ORDERITEM_F        |   849 | 16131 |   592   (3)|
    |* 14 |      INDEX RANGE SCAN            | W_ORDERITEM_F_INDX9  |   852 |       |     4  (25)|
    |* 15 |    INDEX RANGE SCAN              | W_PRDATTR_D_M29_T1   |     1 |     9 |     3  (34)|
    ----------------------------------------------------------------------------------------------Note how the dimension tables W_PRODUCT_D & W_DAY_D are joined using cartesian join before joining to the fact table W_ORDERITEM_F using the composite index 'W_ORDERITEM_F_INDX9'. This index consists of LAST_UPD_DT_WID, PROD_WID and ACTION_TYPE_WID, which are foreign keys to the dimension tables.
    Now if I add one more table to the query:
    select count(distinct decode( T30256.HEADER_FLG , 'N' , T30256.ROW_WID ) ) as c1,
                  T352305.DAY_DT as c2,
                   case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end  as c3,
                   T30371.X_BT_DLR_GROUP as c4,
                   T352305.ROW_WID as c5
              from                W_PRODUCT_D T30955,
                   W_PRDATTRNM_D T44643,                         
                   W_DAY_D T352305,                 
                   W_ORDERITEM_F T30256,              
                   W_ORDER_D T30371,                                            
                   W_PRDATTR_D T40081                         
              where  ( T30955.ROW_WID = T44643.ROW_WID
              and T30256.LAST_UPD_DT_WID = T352305.ROW_WID
              and T30256.PROD_ATTRIB_WID = T40081.ROW_WID
              and T30256.PROD_WID = T30955.ROW_WID
              and T30256.ORDER_WID = T30371.ROW_WID
              and T30955.PROD_NAME = 'Mobile Subscription'
              and T30371.STATUS_CD = 'Complete'
              and T30371.ORDER_TYPE = 'Sales Order' 
              and (case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end  in ('BT150BB-18M', 'BT250BB-18M', 'BT50BB-18M', 'BT600BB-18M'))
              and T352305.DAY_DT between TO_DATE('2008-09-27' , 'YYYY-MM-DD') - 7 and TO_DATE('2008-09-27' , 'YYYY-MM-DD') - 1
              group by T30371.X_BT_DLR_GROUP, T352305.ROW_WID, T352305.DAY_DT,
              case  when T44643.PRODUCT_CLASS_NAME = 'MobileSubscription' then T40081.ATTR15_CHAR_VAL else 'Unspecified' end;I have added a single table W_ORDER_D to the query, and the execution plan is:
    | Id  | Operation                          |  Name               | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                   |                     |    44 |  6336 | 78695   (3)|
    |   1 |  SORT GROUP BY                     |                     |    44 |  6336 | 78695   (3)|
    |   2 |   NESTED LOOPS                     |                     |    44 |  6336 | 78694   (3)|
    |   3 |    NESTED LOOPS                    |                     |   269 | 27707 | 78145   (3)|
    |*  4 |     HASH JOIN                      |                     |  6826 |   626K| 64221   (3)|
    |   5 |      TABLE ACCESS BY INDEX ROWID   | W_DAY_D             |     8 |   112 |     4  (25)|
    |*  6 |       INDEX RANGE SCAN             | W_DAY_D_M39         |     1 |       |     3  (34)|
    |   7 |      TABLE ACCESS BY INDEX ROWID   | W_ORDERITEM_F       | 86886 |  2206K| 64197   (3)|
    |   8 |       NESTED LOOPS                 |                     | 87004 |  6797K| 64200   (3)|
    |   9 |        NESTED LOOPS                |                     |     1 |    54 |     4  (25)|
    |  10 |         TABLE ACCESS BY INDEX ROWID| W_PRODUCT_D         |     1 |    37 |     3  (34)|
    |* 11 |          INDEX RANGE SCAN          | W_PRODUCT_D_M2      |     1 |       |     2  (50)|
    |  12 |         TABLE ACCESS BY INDEX ROWID| W_PRDATTRNM_D       |     1 |    17 |     2  (50)|
    |* 13 |          INDEX UNIQUE SCAN         | W_PRDATTRNM_D_P1    |     1 |       |            |
    |* 14 |        INDEX RANGE SCAN            | W_ORDERITEM_F_N6    | 86886 |       |   212  (18)|
    |* 15 |     INDEX RANGE SCAN               | W_PRDATTR_D_M29_T1  |     1 |     9 |     3  (34)|
    |* 16 |    INDEX RANGE SCAN                | W_ORDER_D_N6        |     1 |    41 |     3  (34)|
    -----------------------------------------------------------------------------------------------Now CBO doesn't choose the composite index and the cost also has increased to 78695. But if I simply add an /*+ORDERED*/ hint to the above query, so that it should join the dimension tables before joining to fact table, then the cost drops to 20913. This means that CBO is not choosing the plan with the lowest cost. I tried increasing the optimizer_max_permutations to 80000, setting session level optimizer_dynamic_sampling to 8 (just to see if it works), but no success.
    Could you please advise how to overcome this problem?
    Many thanks.

    joshic wrote:
    Database: Oracle 9.2.0.6 EE
    OS:Solaris 9
    I am trying to tune a query that is generated via Siebel Analytics. I am seeing a behaviour which is puzzling me but hopefully would be 'elementary' for someone like JPL.
    The query is based on a total of 7 tables. If I comment out any 2 dimension tables, the query picks up the right index on the fact table. However, the moment I add another table to the query, the plan goes awry.
    I have added a single table W_ORDER_D to the query, and the execution plan is:
    Now CBO doesn't choose the composite index and the cost also has increased to 78695. But if I simply add an /*+ORDERED*/ hint to the above query, so that it should join the dimension tables before joining to fact table, then the cost drops to 20913. This means that CBO is not choosing the plan with the lowest cost. I tried increasing the optimizer_max_permutations to 80000, setting session level optimizer_dynamic_sampling to 8 (just to see if it works), but no success.Back to the original question:
    * Can you force the index usage of the composite index on W_ORDERITEM_F in the second query using an INDEX hint (instead of the ORDERED hint)? If yes, what does the plan look like, particularly what cost is reported?
    * Could you post the plans including the "Predicate Information" section below the plan output?
    * What is the definition of the index W_ORDERITEM_F_N6 on W_ORDERITEM_F?
    * Are the cardinalities reported in the execution plans close to reality or way off? The best way to verify this would be to run your query with SQL tracing enabled and generate a tkprof output. If you do so please post the tkprof output here as well.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • F.05-Curr Translation - System not picking correct accounts from FBKP (KDF)

    Hi FI Gurus,
    We are having  INR as Company Code Currency & USD as  Group Currency.
    We have given a diff set of accounts in FBKP-KDF for valuation and translation.
    When we run F.05 for translation with Currency Type 30, the system is correctly converting all INR line items into USD  but while posting the accounting document the valuation accounts are getting picked up instead of translation.
    In debug, we found out that the system requires Clearing Document to go for Translation accounts & if it gets the clearing document in line item then  it is picking up the  correct accounts.
    But then how the translation works for P&L accounts or balance accounts?
    What is the exact functionality of Translation? How postings can be generated to correct accounts?
    Regards
    AK

    Make the following entries in F.05 and execute.
    General Selections:
    1. Enter comany code
    2.Valuation Key Date
    3.Valuation  Method
    4. Valuation in Curr Type: 30
    Under Posting:
    1. If you are running it in a test mode, then do not check the boxes Bal. sheet preparation valuation and Create Postings.
    2. Enter document date, posting date and period
    3. Check the box: Reverse Postings
    Under Open Items
    1. Check Valuate G/L Account Open Items
    2. Specify your G/L Account Numbers
    3. Check the radio button: Valuate GR/IR
    4. Check the box: Valuate Vendor Open items
    5. Check the box: Valuate Customer Open Items
    Under G/L Balances
    1. Check the box: Valuate G/L Account Balances
    2. Specify your G/L Account Numbers
    Under Other
    In our system, we created a variant and entered it in the blank field next to List Variant.
    Under FASB 52
    1. Exch. rate type for translation: Enter your exchange rate type here.
    2. Check the box: Use for translation
    3. Translation of currency type: 10
    Execute your report.
    Point of Note: None of this would work if you have not configured your foreign currency valuation properly. To get FCV working can be very frustrating and you would need to take your time. We have been working on ours for almost 7months now so patience and more research would help.

  • Extensions are not signed correctly! what does that mean.

    sorry i dont know what to do on these forums, i cant open extensions as it says they are not correctly sighned does anyone know what that means and how do i go about correcting it.....please dont go of on one if im in the wrong area or ive set this out wrong. i cannot contact adobe...

    At this site:
    The extension could not be loaded because it was not properly signed (Adobe Photoshop CC 2014) – onOne Software
    I found this:
    The extension could not be loaded because it was not properly signed (Adobe Photoshop CC 2014)
    To resolve this issue please perform the following.
    1. Close Adobe Photoshop
    2. Download and install the Adobe Extension Manager. This is available through the Adobe CC App and also here: https://www.adobe.com/exchange/em_download/
    3. Go to the following location:
    C:\Program Files (x86)\Common Files\Adobe\CEP\Extensions\onOne
    and delete the onOne folder.
    4. Open the Adobe Extension Manager app.
    5. Go to: File > Install Extension. Navigate to:
    C:\Program Files\onOne Software\Perfect Photo Suite 9\Plug-in Files\Panels\onOne.zxp
    add the onOne.zxp by highlighting it and clicking open.
    6.  Launch Adobe Photoshop CC 2014
    This seems to relate to the onOne app. You may want to modify the instructions to coincide against your own extension apps
    Good luck.

Maybe you are looking for