Cursor Optimization issue

Hello everybody,
im a bit new in sql coding and i need your help to optimize a cursor i have created that seems (a bit - not much) slow. Any comments-suggestions are welcomed . Ty in Advance,
Mike
(the purpose of the cursor is to take multiple values from a buffer-tmp table from a remote mssql db to my oracle one and then divide them depending use in different tables... in detail these are customers that are performing some communications with some companies .... these comms are called OBD, the hard thing was that the remote system is totally different in architecture from mine... the cursor works fine but i believe it can be coded to be faster)
CREATE OR REPLACE PROCEDURE RETRIEVE_OBD_DATA4 (
comm_numEntries OUT NUMBER, comm_numUpdates OUT NUMBER, comm_numInserts OUT NUMBER,
lov_numEntries OUT NUMBER, lov_numUpdates OUT NUMBER, lov_numInserts OUT NUMBER,
pel_numEntries OUT NUMBER, pel_numUpdates OUT NUMBER, pel_numInserts OUT NUMBER) IS
l_indx1 NUMBER; l_comm1 char(600);l_code1 NUMBER;l_indx2 NUMBER;l_comm2 char(600);
l_code2 NUMBER;l_tmp1 NUMBER;
p_indx_id1 NUMBER;p_name1 char(400);p_surname1 char(400);p_address1 char(400);p_region1 char(800);
p_username1 char(400);p_brandname1 char(400);p_nomiki1 char(400);p_afm1 char(400);p_phone1 char(400);
p_fax1 char(800);p_drasti1 char(400);p_date1 char(200);p_gender1 char(400) ;p_tmp1 NUMBER;
c_tmp1 number; OBD_KWDIKOS1 char(800); OBD_ONOMA1 char(600); HMEROMHNIA_E1 char(200); SYMB1 number; LOC1 number; P_INDX_ID2 number;
CURSOR lov IS
SELECT OBD_KWDIKOS AS L_CODE, OBD_ONOMA AS L_COMM
FROM PORTAL.APOPSI_COMM_OBD
GROUP BY OBD_KWDIKOS, OBD_ONOMA;
CURSOR pelates IS
SELECT ONOMA AS P_NAME, EPWNYMO AS P_SURNAME, DIEUTHINSI AS P_ADDRESS, DHMOS AS P_REGION,
HMEROMHNIA_K AS P_DATE , DRASTHRIOTITA AS P_DRASTI,GENRE AS P_GENDER,
USERN AS P_USERNAME, EPWNYMIA AS P_BRANDNAME, NOMIKI AS P_NOMIKI, AFM AS P_AFM, THLEFWNO AS P_PHONE,FAX AS P_FAX
FROM PORTAL.APOPSI_COMM_OBD
GROUP BY ONOMA,EPWNYMO ,DIEUTHINSI ,DHMOS ,USERN ,EPWNYMIA ,NOMIKI ,AFM ,THLEFWNO ,FAX,HMEROMHNIA_K,DRASTHRIOTITA,GENRE;
CURSOR comm IS
SELECT O.OBD_KWDIKOS, O.OBD_ONOMA, O.HMEROMHNIA_E, O.SYMB, O.LOC, P.P_INDX_ID
FROM PORTAL.TMP_OBD O INNER JOIN PORTAL.TMP_COMM2 C ON C.ID = O.OBD_INDX INNER JOIN
PORTAL.APOPSI_COMM_PELATES P ON C.NAME = P.P_NAME AND C.SURNAME = P.P_SURNAME AND C.PHONE = P.P_PHONE;
BEGIN
DELETE FROM PORTAL.TMP_PELATES;
l_code1 := 0;
l_indx1 := 0;
l_code2 := 0;
l_indx2 := 0;
l_tmp1 := 0;
comm_numEntries := 0; comm_numUpdates := 0; comm_numInserts := 0;
lov_numEntries := 0; lov_numUpdates := 0; lov_numInserts := 0;
pel_numEntries := 0; pel_numUpdates := 0; pel_numInserts := 0;
p_tmp1 := 0; c_tmp1 := 0;
OPEN lov;
OPEN pelates;
OPEN comm;
LOOP
FETCH lov INTO l_code1,l_comm1;
EXIT WHEN lov%NOTFOUND;
lov_numEntries := lov_numEntries + 1;
SELECT COUNT(*) INTO l_tmp1 FROM PORTAL.APOPSI_COMM_COMM2_LOV WHERE L_CODE = TO_CHAR(l_code1) AND L_COMM = l_comm1;
SELECT (MAX(L_INDX)+1) INTO l_indx1 FROM PORTAL.APOPSI_COMM_COMM2_LOV;
IF l_tmp1 = 0 THEN
lov_numInserts := lov_numInserts + 1;
INSERT INTO PORTAL.APOPSI_COMM_COMM2_LOV(L_INDX,L_CODE,L_COMM) VALUES (l_indx1, TO_CHAR(l_code1), l_comm1);
INSERT INTO PORTAL.TMP_LOV(L_INDX,L_CODE,L_COMM, L_INSERT) VALUES (l_indx1, TO_CHAR(l_code1), l_comm1,1);
ELSE
IF l_tmp1 = 1 then
null;
else
lov_numUpdates := lov_numUpdates + 1;
DELETE FROM PORTAL.APOPSI_COMM_COMM2_LOV WHERE L_CODE = TO_CHAR(l_code1);
INSERT INTO PORTAL.APOPSI_COMM_COMM2_LOV(L_INDX,L_CODE,L_COMM) VALUES (l_indx1, TO_CHAR(l_code1), l_comm1);
INSERT INTO PORTAL.TMP_LOV(L_INDX,L_CODE,L_COMM,L_INSERT) VALUES (l_indx1, TO_CHAR(l_code1), l_comm1,0);
end if;
END IF;
END LOOP;
LOOP
FETCH pelates INTO p_name1,p_surname1,p_address1,p_region1,p_date1,p_gender1, p_drasti1, p_username1, p_brandname1, p_nomiki1 ,p_afm1, p_phone1,p_fax1;
EXIT WHEN pelates%NOTFOUND;
pel_numEntries := pel_numEntries + 1;
SELECT (MAX(P_INDX_ID) + 1) INTO p_indx_id1 FROM PORTAL.APOPSI_COMM_PELATES;
SELECT COUNT(*) INTO p_tmp1 FROM PORTAL.APOPSI_COMM_PELATES WHERE P_NAME = p_name1 AND P_SURNAME = p_surname1;
IF p_tmp1 = 0 THEN
pel_numInserts := pel_numInserts + 1;
INSERT INTO PORTAL.APOPSI_COMM_PELATES (P_DRASTI,P_DATE,P_IDIOTITA,p_gender,P_INDX_ID,p_name,p_surname,p_address,p_region, p_username, p_brandname ,p_nomiki ,p_afm, p_phone,p_fax)
VALUES (p_drasti1,p_date1,' ',p_gender1,P_INDX_ID1, p_name1,p_surname1,p_address1,p_region1, p_username1, p_brandname1 ,p_nomiki1 ,p_afm1, p_phone1,p_fax1);
INSERT INTO PORTAL.TMP_PELATES (P_DRASTI,P_DATE,P_IDIOTITA,p_gender,P_INDX_ID, p_name,p_surname,p_address,p_region, p_username, p_brandname ,p_nomiki ,p_afm, p_phone,p_fax, P_INSERT)
VALUES (p_drasti1,p_date1,' ',p_gender1,P_INDX_ID1, p_name1,p_surname1,p_address1,p_region1, p_username1, p_brandname1 ,p_nomiki1 ,p_afm1, p_phone1,p_fax1, 1);
ELSE
if p_tmp1 = 1 THEN
NULL;
ELSE
pel_numUpdates := pel_numUpdates + 1;
DELETE FROM PORTAL.APOPSI_COMM_PELATES WHERE P_NAME = p_name1 AND P_SURNAME = p_surname1;
INSERT INTO PORTAL.APOPSI_COMM_PELATES (P_DRASTI,P_DATE,P_IDIOTITA,p_gender,P_INDX_ID,p_name,p_surname,p_address,p_region, p_username, p_brandname ,p_nomiki ,p_afm, p_phone,p_fax)
VALUES (p_drasti1,p_date1,' ',p_gender1, P_INDX_ID1, p_name1,p_surname1,p_address1,p_region1, p_username1, p_brandname1 ,p_nomiki1 ,p_afm1, p_phone1,p_fax1);
INSERT INTO PORTAL.TMP_PELATES (P_DRASTI,P_DATE,P_IDIOTITA,p_gender,P_INDX_ID, p_name,p_surname,p_address,p_region, p_username, p_brandname ,p_nomiki ,p_afm, p_phone,p_fax, P_INSERT)
VALUES (p_drasti1,p_date1,' ',p_gender1,P_INDX_ID1, p_name1,p_surname1,p_address1,p_region1, p_username1, p_brandname1 ,p_nomiki1 ,p_afm1, p_phone1,p_fax1,0);
END IF;
END IF;
END LOOP;
LOOP
FETCH comm INTO OBD_KWDIKOS1,OBD_ONOMA1,HMEROMHNIA_E1,SYMB1,LOC1, P_INDX_ID2;
EXIT WHEN comm%NOTFOUND;
comm_numEntries := comm_numEntries + 1;
SELECT COUNT(*) INTO c_tmp1 FROM PORTAL.APOPSI_COMM_OBD_LOCAL O WHERE O.OBD_CODE = OBD_KWDIKOS1 AND
O.OBD_NAME = OBD_onoma1 AND O.OBD_DATE = HMEROMHNIA_E1 AND O.PEL_ID = P_INDX_ID2;
IF c_tmp1 = 0 THEN
comm_numInserts := comm_numInserts + 1;
INSERT INTO PORTAL.APOPSI_COMM_OBD_LOCAL
VALUES (OBD_KWDIKOS1,OBD_ONOMA1,HMEROMHNIA_E1,SYMB1,LOC1, P_INDX_ID2);
ELSE
if c_tmp1 = 1 THEN
NULL;
ELSE
comm_numUpdates := comm_numUpdates + 1;
DELETE FROM PORTAL.APOPSI_COMM_OBD_LOCAL O WHERE O.OBD_CODE = OBD_KWDIKOS1 AND
O.OBD_NAME = OBD_onoma1 AND O.OBD_DATE = HMEROMHNIA_E1 AND O.PEL_ID = P_INDX_ID2;
INSERT INTO PORTAL.APOPSI_COMM_OBD_LOCAL
VALUES (OBD_KWDIKOS1,OBD_ONOMA1,HMEROMHNIA_E1,SYMB1,LOC1, P_INDX_ID2);
END IF;
END IF;
END LOOP;
CLOSE comm;
CLOSE lov;
CLOSE pelates;
END RETRIEVE_OBD_DATA4;
/

Well, to answer myself it turns out that cursors of the form "OPEN - LOOP - EXIT WHEN %NOTFOUND - END LOOP - CLOSE" are not converted to the bulk-collect equivalent, as "FOR rec IN (cursor) LOOP" ones are from 10g R2 onwards (tests below use 11.1.0.6.0).
Implicit (1 fetch):
DECLARE
    i INTEGER := 0;
BEGIN
    FOR r IN ( SELECT * FROM scott.emp )
    LOOP
        i := i + r.empno;
    END LOOP;
END;
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           1
Fetch        0      0.00       0.00          0          0          0           0
total        2      0.00       0.00          0          0          0           1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88 
SQL ID : 5vms4mrz8j7wd
SELECT *
FROM
SCOTT.EMP
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch 1 0.00 0.00 0 7 0 14
total        3      0.00       0.00          0          7Explicit (15 fetches):
DECLARE
    i INTEGER := 0;
    CURSOR c_emp IS
        SELECT * FROM scott.emp;
    r_emp c_emp%ROWTYPE;
BEGIN
    OPEN c_emp;
    LOOP
        FETCH c_emp INTO r_emp;
        EXIT WHEN c_emp%NOTFOUND;
        i := i + r_emp.empno;
    END LOOP;
    CLOSE c_emp;
END;
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           1
Fetch        0      0.00       0.00          0          0          0           0
total        2      0.00       0.00          0          0          0           1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88 
SQL ID : 4ay6mhcbhvbf2
SELECT *
FROM
SCOTT.EMP
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.01       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch 15 0.00 0.00 0 20 0 14
total       17      0.01       0.00          0         20          0          14or another example:
DECLARE
    i INTEGER := 0;
BEGIN
    FOR r IN ( SELECT 1 n FROM dual CONNECT BY rownum < 999 )
    LOOP
        i := i + r.n;
    END LOOP;
END;
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           1
Fetch        0      0.00       0.00          0          0          0           0
total        2      0.00       0.00          0          0          0           1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88 
SQL ID : caf6v3bbkvqkk
SELECT 1 N
FROM
DUAL CONNECT BY ROWNUM < 999
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch 10 0.00 0.00 0 0 0 998
total       12      0.00       0.00          0          0          0         998So in code like the OP's example procedure it is explicit cursors that perform the extra fetch and not implicit ones, and this could help explain why implicit cursors perform better.

Similar Messages

  • Using Reference Cursor Performance Issue in Report

    Hi,
    Are reference cursor supposed to be faster than a normal query? The reason why I am asking is because I am using a reference cusor query in the data model and it has a performance issue on the report, it's taking quite a while to run than If I just run the same reference cursor query in sql*plus. The difference is significantly big. Any input is very much appreciated!
    Thanks,
    Marilyn

    From the metalink bug 4372868 on 9.0.4.x. It was fixed on 10.1.2.0.2 and does not have a backport for any 9.0.4 version.
    Also the 9.0.4 version is already desupported. Please see the note:
    Note 307042.1
    Topic: Desupport Notices - Oracle Products
    Title: Oracle Reports 10g 9.0.4 & 9.0.4.x
    Action plan:
    If you are still on 9.0.4 and later version of oracle reports and have no plan yet to migrate to 10.1.2.0.2 version use the same query you are using in your reference cursor and use it as a plain SQL query in your reports data model.

  • Oracle 11g on Linux : Query Optimization issue

    Hi guru,
    I am facing one query optimization related problem in group by query
    Table (10 million Records)
    Product(ProductId number,ProductName varchar(100),CategoryId VARCHAR2(38),SubCategoryId VARCHAR2(38))
    Index
    create index idxCategory on Product (CategoryId,SubCategoryId)
    Query1:To find product count for all CategoryId and SubCategoryId
    select CategoryId,SubCategoryId,count(*) from Product group by CategoryId,SubCategoryId
    Above query is not using index idxCategory and doing table scan which is very costly.
    When I fire Query2: select count(*) from Product group by CategoryId,SubCategoryId
    then it is properly using index idxCategory and very fast.
    Even I specified hint in Query1 but it is not using hint.
    Can anybody suggest why oracle is not using index in Query1 and what should I do so that Query1 will use Index.
    Thanks in advance.

    user644199 wrote:
    I am facing one query optimization related problem in group by query
    Query1:To find product count for all CategoryId and SubCategoryId
    select CategoryId,SubCategoryId,count(*) from Product group by CategoryId,SubCategoryId
    Above query is not using index idxCategory and doing table scan which is very costly.
    When I fire Query2: select count(*) from Product group by CategoryId,SubCategoryId
    then it is properly using index idxCategory and very fast.
    Even I specified hint in Query1 but it is not using hint.
    Can anybody suggest why oracle is not using index in Query1 and what should I do so that Query1 will use Index.The most obvious reason that the table needs to be visited would be that the columns "CategoryId" / "SubCategoryId" can be NULL but then this should apply to both queries. You could try the following to check the NULL issue:
    select CategoryId,SubCategoryId,count(*) from Product where CategoryId is not null and SubCategoryId is not null group by CategoryId,SubCategoryId
    Does this query use the index?
    Can you show us the hint you've used to force the index usage and the EXPLAIN PLAN output of the two queries including the "Predicate Information" section? Use DBMS_XPLAN.DISPLAY to get a proper output, and use the \ tag before and after when posting here to format it using fixed font. Use the "Quote" button in the message editor to see how I used the \ tag here.
    Are above queries representing the actual queries used or did you omit some predicates etc. for simplicity?
    By the way, VARCHAR2(38) and ...ID as name, are these columns storing number values?
    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/

  • SNP Optimizer Issue

    Hi Experts,
    We are working on SNP Optimization scenario with Transportation, Procurement, Strorage and penalty Cost. Our business process trading industry (we procure and sell).
    We maintained Optmizaion profile with linear and Primal simplex Algorithm. We took a sample scenario where our product has four suppliers with diffrent transportation costs maintained in transportation lanes.
    In SDP94, Optimizer behaving diffrently.
    Case 1: When we run directly at destination location (product + Destination) level optimization running smoothly with out picking any transportation lanes, costs. Subsequently no purchase requistions are created.
    Case 2: When we select all locations (Product + Source and Destination) and run optimization the following errors are coming which we are not able to identify the origin.
    Error 1: Cost function 051MhWG07j6MwgLZXQcXSm not found
    Error 2: Conversion from STD to EA for product WDE-MATL1A not maintained
    Error 3: Error occurred when reading data
    We checked CCR no errors are identified. Also there is no UOM called STD. We couldn't understand why Optimizer is proposing STD to EA conversion error.
    Can you please throw some light.
    Thanks in advance

    Hi Ugameswara Rao
    When you run optimizer,you need to run as a whole including all teh Network...So,the first observation is standard
    Regarding teh second issue,It is a Master data inconsistency,So,please identify the 'concerned location product' and maintain the cost accordingly(Check teh log to find the concerned location product)
    Regarding error "Error occurred when reading data",please raise a seperate thread,as the raesons for this are multiple...but try this first run //om17,model consistency check and correct the data model set...but,the reason for this could also be a softwre error....hence,if the above don't help,please rasise a seperate thread with all details like: STEP in which thi serror occur,and also teh message log details
    Thanks and Regards
    Suresh

  • Configuring Maintenance Optimizer issue

    Hi All,
    This is the first time I am configuring SM 4.0. I am done with installation, and want to conigure maintenance optimizer.
    I followed the IMG guide step by step.
    But after all done, there are no systems listed under the maintenance optimizer of my Solution Landscape.
    Instead I get a message:
    <b>Change requests cannot be displayed or created, because the RFC connection has errors, or is not maintained.
    Check whether the RFC connection to the Change Man agement system is under the key CHARM_DEST (APPLI field in the DESTINAT field), in the view BCOS_CUST. You need authorization for the cross-client view/table maintenance (S_TABU_DIS and S_TABU_CLI).
    Check the RFC connection in the transaction SM59. If your SAP Solution Manager system is also your Change Manager system, the internal connection must be 'NONE'. You need authorization for the administration of RFC connections (S_RFC_ADM).</b>
    Meanwhile I have issue with my J2EE engine not starting due to some UME issues, which I am working on parallely.
    Please do let me know what would be the issue.
    I have followed the note 990534 and doen with the BC sets.
    But I am not sure where am I making a mistake.
    One more doubt is, does maintenance optimizer connect to the SAP service market place through SAPOSS??? and am I not seeing anu system because my SLD is down. Please bear with my ignorance, I am a little lost here.
    I have completed the solution landscape, logical component, etc.
    Please help...
    Regards,
    Sapfan

    Hi JP,
    My current SP levels are:
    SAP_BASIS - 0011
    SAP_ABAP - 0011
    PI_BASIS 2005_11 - 0011
    ST-PI 2005_11 - 0003
    SAP_BW - 0011
    SAP_AP - 0007
    BBPCRM 5 - 0007
    CPRXRPM - 0007
    ST400 - 0010
    ST-ICO - 0008
    ST-SER - 0007
    The issue is I did not connect to SAP yet, as I have only one RFC generated i.e. SAPOSS> Since my SAPRouter is not yet configured, I will connect to a valid  SAPRouter once all the SM config is done.
    I als got sone error in generating RFC for the main system when I used the wizard. I selected Change management and customizing directory and also selected Assign RFC for system monitoring.
    I changed back the UME source to client 001, but still same.
    Moreover the maintenance optimizer is not showing the satellite system.
    I am really stuck.
    Please let me know if you require more information.
    I created the main system and defined the solution, as per the SPRO->Solution Manager -> Advanced Configuration -> Basic settings ->
    I started this only after applying SP10.
    Now I don see the systems both for Setup Solution monitoring and in maintenance optimizer.
    WIll the system not reflect is the java ebngine is down???
    Regards,
    P.K

  • TopLink design/optimization issues

    I've been developing a prototype using TopLink sporadically over the last few months, and I have 2 questions:
    1. Is there a way in a ManyToManyMapping to optimize the DELETE SQL statements that are generated when a collection is modified? I have a large number of options that are associated with objects. Whenever I modify these options I get statements such as:
    DELETE FROM T_USERSGROUPS WHERE GROUPID = 3 AND USERID= 1
    DELETE FROM T_USERSGROUPS WHERE GROUPID = 2 AND USERID= 1
    DELETE FROM T_USERSGROUPS WHERE GROUPID = 47 AND USERID= 1
    Followed by the INSERT statements.
    Is there a way for TopLink to generate 1 DELETE FROM T_USERSGROUPS WHERE USERID=1 and the beginning of this transaction?
    2. Many of my frequently used tables contain 50-100 rows of data and the TopLink caching works pretty well. However, I have many instances in my app where I query for ALL of these objects. If I ask for a specific item, the DB is not queried because it is found in cache. However, I would like to avoid a DB query when asking for all objects as well.
    I understand the TopLink does provide some optimizations by not actually populating this object if already found, but I'm wondering if there is a trick or setting that would cause TopLink to a[i]Long postings are being truncated to ~1 kB at this time.

    2 great questions. For some reason the second question was truncated somewhat though..
    1 - Bulk update/delete statements are not supported at this time, but it is on the radar screen and something that is being investigated. The issue is cost/benefit. Engineering needs to weigh the costs of calculating in Java if a bulk update can/should be done vs the speed of just doing the increased SQL calls. Likely, some application intervention would be required.
    2 - I can only read the first paragraph, but I think you are asking about in memory queries. The situation you describe is what I would call "reference data", and I would actually recommend not using in memory queries for that -- there is a better way. Simply cache a vector on your own in the app that holds onto all the cached objects. I.e., do a read all query that hits the database first, then cache that collection somewhere. Since it's a finite list, you don't have to worry about size, and since you have a reference to the objects in the collection, the won't be GC'd. This would be faster than doing an in-memory query. Now if you're doing queries to find subsets of the data, it's likely faster to go to the database. Databases are faster at queries than doing the operation[i]Long postings are being truncated to ~1 kB at this time.

  • Host Cursor scaling issue

    I turned on Host Cursor for participants, but find that it doesn't scale correctly. Where I am pointing on my large screen as Host is not where the participant sees it!  That is worthless.  Any idea on how to fix this?  I am running Connect 9.01.
    P.S.
    I'd really like a way to enable the cursor briefly, on demand.  Like hold down some key while moving the mouse.  Having it always on or off is not effective for me. Anything I am overlooking?

    Hello,
    No one here has any access to what would be necessary to help. The problem is between your device and the Telstra network...but only they can look at their network. You need to be escalated to someone at a higher level of support who can actually look deeper to figure this out.
    Good luck and let us know!
    BTW - Are your voice services working fine? Those must be prior to trying anything with data.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Optimizer Issues

    Hi Experts,
    We are working for trading industry where we procure and sell the products. We haven't setup PPM/PDS. We are using Optimizer extensively. We have been facing the following two issues. If you encouter the same, please let us know.
    -> We have saftey stock maintained in location master (Destination) with method SB. When we run optimizer system doesn't considering the safety stock and only considering the demand. Please suggest How do we make system to consider safety stock also as demand.
    -> After Optimization, receipts are generated at Distribution receipts at Source even product is marked for "X" in procurement tab page at source level. Why system is not giving importance to Production receipts is worrying me. Can you please throw some light.
    Thanks & Regards
    Ugamesh

    Hi,
    Please first make sure that:
    1)In product master, you have maintained safety stock on 'lot size' tab.
    2)In product master, 'Procurement' tab, whether you have set anything for the below two fileds:
    Prod. Storage Costs
    Safety Stock Penalty
    If storage costs is high, you may not get stock created.
    3)In optimizer profile, you set other option than 'Ignore safety stock' on the first tab.
    Then you go to /sapapo/opt11 to check the optimizer log. Find your log, and push the application log icon (on the second column).
    In the Input log, there's a table calls 'ET_LOCPROD'. Check whether safety stock is correctly input.
    You can also check result log, but if you use 'Expain' functionality, you may get a better view of the result.
    Regarding the source of supply, optimizer source determination is based on costs.
    If the costs on PPM/PDS is more than transportation lane, transportaion lane will be chosen and distribution receipts are created instead of production receipts.
    Please refer to online help http://help.sap.com/saphelp_scm70/helpdata/EN/da/8df3128121304a8dc1eef961a6d3a8/frameset.htm
    Source Determination in Supply Network Planning -> Source Determination (Optimizer)
    Best Regards/Ada

  • Process & optimize issue with timeid

    Hi,
    I work on script logics with BPC 7.0 xls2007 sql2005.
    I need to process my application but I have this issue message :
       - Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_tblFactEPS, Column: TIMEID, Value: 10000022.
    Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation.
    Errors in the OLAP storage engine: An error occurred while processing the 'EPS' partition of the 'EPS' measure group for the 'EPS' cube from the DEV database.
    Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation.
    Internal error: The operation terminated unsuccessfully
    The timid value 10000022 correspond to 2010.TOTAL.
    So I saw the dbo_tblFactEPS table with :
    Select * from tblfactEPS where TIMEID not in (select timeid from mbrTIME)
    But my selection is empty...
    Moreover, I can't process my time dimension.
    Can you help me ?
    Regards,
    Morgann

    2010.Total is not a base member and normally you should not have something like that into your fact table.
    Into fact table you must have just base members.
    your selection is not completed. It has to be
    Select * from tblfactEPS where TIMEID not in (select timeid from mbrTIME where calc = 'N')
    If you will do that actually you will see records.
    Kind Regards
    Sorin Radulescu

  • WAAS EMAP Optimization issue

    Dear Team,
    In WAAS Setup we are not seeing any Optimized EMAPI connection and below error is showing in Alarm section  for all Edge WAE devices.
    Wansecure encountered a peering service configuration error: ssl peering service configuration mismatch with peer device id 88:f0:31:b3:6e:c8. The following protocol acceleration can fail: SSL-AO, ICA (if using Wansecure) and Encrypted MAPI.
    We have verified the SSL peering configuration between Edge and core device and not found found any mismatch between them. Please suggest how we can resolve this issue.
    Regards,
    Ranjith

    Hi,
    Try the following on all the WAAS devices participating in the flow. (Core + edge)'
    WAAS #sh acc wansecure
    Accelerator Licensed Config State Operational State
    wansecure Yes Enabled Running
    WAN Secure:
    Accelerator Config Item Mode Value
    SSL AO User enabled
    Secure store User enabled
    Peer SSL version User default
    Peer cipher list User configured
    Peer cert User default <<<<Should be same for all devices
    Peer cert verify User enabled
    Follow the doc below.
    http://www.cisco.com/c/en/us/td/docs/app_ntwk_services/waas/waas/v501/configuration/guide/cnfg/policy.html#wp1156757
    Hope that resolves the issue.
    Regards,
    Abhishek
    CCIES 35269

  • Cursor drag issue

     Dear all,
    I have some problems playing around with dragging of cursors.
    In my application i have a graph with 2 cursors. There is 1 Primary Cursor(Black Color) which can be moved anwhere on the graph. And another one(in Green) cannot go to the left of Black.
    On "Cursor move" event(for green), whenever the X value of the cursor is less than the Black, i make the value of Allow Drag to False. But its not working,
    Could you pls have a look at my Vi and suggest me some alternative.
    Thanks,
    Ritesh
    Solved!
    Go to Solution.
    Attachments:
    FWave.vi ‏40 KB

    Hi Altenbach,
    Thanks alot for your reply. That did Help.
    I am almost done with that mini VI  that i was asked to do.
    It would be really great if anyone of you could have a look at it and comment on my Programming.
    See if there's any place where i could make it more professional/robust/efficient. I have tried alot not to use Local variables much. But as i dived into the world of LabVIEW not more than 4 months ago, i couldn't resist myself of using it.
    Any sort of Help on improving the VI will he Helpful.
    I am attaching the .rar file. FWave.vi is the main VI.
    Thanks,
    Ritesh
    Attachments:
    F-Wave.zip ‏128 KB

  • Cursor  Focus issue

    Hello Everyone,
    I have added a remember my username checkbox with login box.
    If somebody clicks the checkbox it remembers the username.
    However, the cursor remains with the first item ie. username.
    I want to change the cursor focus to password field if username
    field is not null.
    Can anybody help me in setting the tabindex property for password field.
    I want to set the tabindex in my plsql procedure.
    Thank You,
    Parveen

    You can do that in your page header Javascript code as follows:
    function first_item(){
    if (document.getElementById("PX_USERNAME") )
    document.getElementById("PX_USERNAME").focus();
    else
    document.getElementById("PX_PASSWORD").focus();
    }where PX_USERNAME and PX_PASSWORD are your username/pwd fields...and then in your page HTML body code put :
    onLoad=first_item();Thanks,
    Sam

  • Optimization Issues - Jrockit with JBoss

    Hi,
    I am quiet new here. forgive if my questions are dump.
    We are having a problem on JBoss(Version: 5.0.0.CR2) server running with Jrockit(Version :build R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32)
    The server hang frequently.
    was trying to optimize the JVM settings.
    Initial JVM setting was : set JAVA_OPTS=%JAVA_OPTS% -Xms768m -Xmx1024m -XX:MaxPermSize=256m
    Later have chaged to
    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -Xns512m -XXkeepAreaRatio=3 -XXsetGC:genparcon -XXcompactSetLimit:10200 -Xverbose:gc -Xverboselog:jbossVerboseLog.txt
    But getting some page fault errors as shown below,
    +[INFO ][memory ] Warning: Your computer has generated 31142 page faults during the last garbage collection.+
    +[INFO ][memory ] If you find this swapping problematic, please consider running JRockit with a smaller heap.+
    After few hours it started Throwing OutOfMemory: allocLargeObjectOrArray
    So I included the XXtlaSize in jvm settings,
    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -Xns512m -XXlargeObjectLimit=70k -XXtlaSize=70k -XXminBlockSize=96k -XXkeepAreaRatio=3 -XXsetGC:genparcon -XXcompactSetLimit:10200  -Xverbose:gc -Xverboselog:jbossVerboseLog.txt
    But server become very unstable, server restarted automatically.
    Now we revert all the changes to initial settings.
    Please suggest me in case if i need to look into something else.
    Thanks in advance.
    Karthik

    Hi,
    I am quiet new here. forgive if my questions are dump.
    We are having a problem on JBoss(Version: 5.0.0.CR2) server running with Jrockit(Version :build R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32)
    The server hang frequently.
    was trying to optimize the JVM settings.
    Initial JVM setting was : set JAVA_OPTS=%JAVA_OPTS% -Xms768m -Xmx1024m -XX:MaxPermSize=256m
    Later have chaged to
    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -Xns512m -XXkeepAreaRatio=3 -XXsetGC:genparcon -XXcompactSetLimit:10200 -Xverbose:gc -Xverboselog:jbossVerboseLog.txt
    But getting some page fault errors as shown below,
    +[INFO ][memory ] Warning: Your computer has generated 31142 page faults during the last garbage collection.+
    +[INFO ][memory ] If you find this swapping problematic, please consider running JRockit with a smaller heap.+
    After few hours it started Throwing OutOfMemory: allocLargeObjectOrArray
    So I included the XXtlaSize in jvm settings,
    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -Xns512m -XXlargeObjectLimit=70k -XXtlaSize=70k -XXminBlockSize=96k -XXkeepAreaRatio=3 -XXsetGC:genparcon -XXcompactSetLimit:10200  -Xverbose:gc -Xverboselog:jbossVerboseLog.txt
    But server become very unstable, server restarted automatically.
    Now we revert all the changes to initial settings.
    Please suggest me in case if i need to look into something else.
    Thanks in advance.
    Karthik

  • Sun C 5.9 optimization issue (-xO3 and higher)?

    It looks like the C compiler is sometimes a bit too enthusiastic about removing obsolete code at optimization level -xO3 and higher (32-bit memory model).
    I would expect the following piece of code to break from the loop after 137 iterations, exploiting the integer overflow and 'wrarp-around' of time_now.
    This happens only up to and including optimization level 2.
    It looks like at -xO3 and higher, the compiler thinks that since time_now starts at a positive value and is always incremented with a positive value,
    the if statement with the break can be optimized away.
    #include <stdio.h>
    #define SECONDS_PER_DAY 86400
    #define APPROX_SECONDS_PER_HALFYEAR 15768000
    #define NR_HALF_YEARS 1280
    void
    main(int argc, char *argv[])
    register int i;
    long time_now;
    for (i=0, time_now=2*SECONDS_PER_DAY; i < NR_HALF_YEARS; ++i, time_now+=APPROX_SECONDS_PER_HALFYEAR){
    if (time_now < 0){ /* passed 2037 ... */
    break;
    fprintf(stderr, "%d %ld\n", i, time_now);
    }

    The optimizer is not too enthusiastic. The program depends on behavior that is undefined by the C standard.
    The C standard does not define the results of signed integer overflow. (Unsigned integer wrap-around is required.) Signed integer overflow can wrap around as you expect, could generate a trap, or possibly have some other behavior. Programs that depend on a particular result are not portable.
    The optimizer, particularly at high optimization levels, takes advantage of undefined or unspecified behavior to produce faster code. Unportable programs can display different behavior at different optimization levels, just as they can display different behavior using different compilers.

  • Apex 4.2 theme 25 Text item cursor focus issue

    Hi
    Apex 4.2 theme 25, linux , 11gR2
    I have 4 region on page , first region Info display region html, other are form region with Insert sql statements.
    Page:     12 Operational
    *Name     P12_abc
    Display As TextField
    User Interface
    *Sequence 160
    *Region      abc
    Template     REQUIRED(HORIZONTAL-RIGHT ALIGNED)
    Grid Layout
    Start New Row     YES
    Column          AUTOMATIC     
    Column Span      AUTOMATIC                    
    Label        ABC
    Settings
    Value Required YES
    Subtype     TEXT
    Submit when Enter pressed     NO
    Disabled     NO
    Element
    Form Element Width     11   Maximum Width20
    Value Placeholder     null
    HTML Form Element CSS Classes     
         null
    HTML Form Element Attributes     null
    ISSUES_
    One can not click inside the first(this) field. The only current user workaround is to click on the field/item label and then focus occurs OR click in second field and shift tab.
    QUestion
    Is it due to Template     REQUIRED(HORIZONTAL-RIGHT ALIGNED) ?
    IS it due to having two items on same grid( parallel to each other)?
    Am i missing some setting or this is a bug ?
    Thanks so much for looking into this.

    BUG in 4.1 application theme 25

Maybe you are looking for