Query takes twice as long for identical database on two seperate systems.

Hi, I am looking for some help with a performance issue on a particular database.
I am executing the query
'for $o in collection("rx.dbxml")/rx[dbxml:metadata("janusId")="12345"] order by $o/@dos descending return <item id="{ replace(dbxml:metadata("dbxml:name", $o),"&#34;", "_") }"> {$o} </item>'
on two different systems through a python xmlrpclib ServerProxy object. This is the my test query but the performance of other queries exhibits the same issue.
The data on both systems is identical and the time required to execute this query is the same for both systems across
every database, except for one. For this particular database, the time required to execute the query on System B is double
that of System A.
This is only the case for one particular database which makes me think that it is a data issue?
However the data is identical on both systems.
Is anyone aware of any data related issues that would cause such a performance hit based on
the different setups listed below? What should be my next step in diagnosing this problem?
System A
- 1 x Quad core Intel(R) Xeon(R) CPU E5450 @ 3.00GHz
- 32 GB RAM
- Red Hat Enterprise Linux Server 5.1 (Tikanga)
- Berkeley dbxml 2.4.13 patched to 2.4.16
- bsddb3 4.5.0
- Python 2.4.4
- Twisted 8.2.0
- SOAPpy 0.12.0
- Filesystem Size Used Avail Use% Mounted on
/dev/sda5 39G 33G 4.3G 89% /
System B
- 2 x Dual core Intel(R) Xeon(TM) CPU @ 2.80GHz
- 12 GB RAM
- Red Hat Enterprise Linux Server 5.3 (Tikanga)
- Berkeley dbxml 2.4.16
- bsddb3 4.7.5
- Python 2.4.4
- Twisted 8.2.0
- SOAPpy 0.12.0
- Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 384G 88G 277G 25% /
Thanks for any help.

Try looking at db_stat output for each system for the query itself.
1. clear stats:
db_stat -Z -m
2. run the query
3. look at stats:
db_stat -m
Note any suspicious differences. You can/should also monitor disk and IO during the queries. If the plans are truly the same and the data is the same that points at system differences which would mostly be IO. At least that's the first place to look.
Regards,
George

Similar Messages

  • Query takes very very long time to display on the web portal.

    HI Gurus
    My query takes very very long time to display the result on the web.It takes almost 30 mins to show the
    results.However when I execute the same query in analyzer it shows the result in 10 Sec.
    Gurus could u please let me what r the steps required to increase teh performance of it.
    What steps BI Consultant take to resolve it . Is it a portal issue.
    Regards
    loyee

    Hi,
    you can use the following parameters to the start URL: &PROFILING=X&TRACE=X. They could be set in iView of Portal as well as the url of the webtemplate. You will get information about performance of the web application.
    Additional check this notes:
    NW 7.0 BI Web Applications: Performance Problem Analysis
    SAP Note Number: [1048691|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler]
    Performance problems when you start a query in Java Web
    SAP Note Number: [950602|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler]
    Also intresting threads:
    Re: Poor performance Web vs Bex
    Re: BEx vs the Web : Which provides better performance
    Regards
    Andreas

  • IDVD 6 encoded takes twice as long as iDVD 5?

    I did a quick search of archives but if this has been answered and I missed it, I apologize.
    I tried upgrading to iLife 6 (since this computer was purchased in December it came with iLife 5). Even using the identical menus I used from iDVD 5 in iDVD 6, encoding times are -at least- double in iDVD 6. To confirm this I deleted iLife 6 and reinstalled iLife 5 and encoded the same projects in iDVD 5 and the time difference really is a factor of 2! I tried the usual: repair permissions, installed the latest updates to iDVD 6 but the differenence remains with iDVD 6 taking twice as long to encode the same project.
    Is this consistent with others' experiences?
    Is there something I'm missing here?

    Thanks John, the old discussion was helpful. It seems that others have found iDVD 6 to be a dog on non-Intel Macs as well and, in some cases, experienced even worse than a 100% slowdown if I read some of the posts correctly.
    I hate to think that -this- is how Apple is claiming that Intel Macs are so much faster, by creating Universal Apps that run terribly on non-Intel Macs! My computer is a currently shipping model (I was stupid enough to believe the story that that Intel Pro machines wouldn't be released until 2007). If Apple software isn't optimized for it's own shipping hardware, which seems to be the case... sorry to digress
    Anyway, I'll try to have some specific comparison results later after I reinstall 6. I checked and iDVD 5 was running consistently at 230-240% CPU usage with peaks of 270% so it is doing a good job of using the multiple processors (processor performance set to "automatic"). It'll be interesting to see what iDVD 6 does in that regard.

  • Ever since I updated to Firefox 7.0.1, it's takin twice as long for Mozilla to open and for websites to load. It's also started crashing more often. Is there anyway to revert back to the older versions?? I never had a problem with those..

    After the update to the newest version of Mozilla Firefox (7.0.1), it's taken the program twice as long to open and even more time for pages to load. I've also gotten error messages saying that the page can't be loaded, even though everything else I use (Skype, etc) is running fine and connected to the internet. I didn't have these issues with the older versions of Mozilla, so please put out a patch or something soon. Or if I could revert to an older version of Mozilla, I'd be just as happy.

    After the update to the newest version of Mozilla Firefox (7.0.1), it's taken the program twice as long to open and even more time for pages to load. I've also gotten error messages saying that the page can't be loaded, even though everything else I use (Skype, etc) is running fine and connected to the internet. I didn't have these issues with the older versions of Mozilla, so please put out a patch or something soon. Or if I could revert to an older version of Mozilla, I'd be just as happy.

  • Spooling of a query generates different file sizes for different databases

    Please help me regarding a problem with spooling. I spooled a query output to a file from two different database. In both the databases the table structure is the same and the output produced only one row. But the file size is different for the databases. How can this problem occur? Is there any database parameter need to be checked? Both the databases are in same version 10.2.0.1.0.
    before running the spool i did a
    sql> set head off feedback off echo off verify off linesize 10000 pages 0 trims on colsep ' '
    on both the sessions.
    In one database the filesize is *1463 bytes* and on the other the filesize is *4205 bytes*.
    Please help me to find out these discrepancies.

    hi Mario,
    I think you are not getting my point. Both the files contain the same output but their sizes are different. This is due to the no of blank spaces between columns. I wanted to clarify why there is a difference between two filesize when the query output is the same.

  • Batch capture takes twice as long to capture

    Weird problem. Say I have 3 clips on a single tape (this happens across all tapes and projects) I log them and then select them to batch capture.
    All, seemingly, goes well, they cue up and the log and capture screen says "item 1 of 3" or "2 of 3" etc.. but then when it looks like it is done, rather than end, it goes all the way back to the beginning and seemingly re-captures all footage! When I check my capture scratch folder, i only have one file for each capture sequence.
    Thus, my capturing takes 2x as long to capture!
    any ideas?
    thanks
    FC Studio 2 (i.e. FCP 6.x)

    So it's PAL footage? or NTSC? anamorphic?
    Odd though, never seen this behavior, so not sure how to troubleshoot it other than to rebuild your startup disk... (the old sledge hammer approach). It shouldn't be happening though and likely won't with all the setup being clean (as in rebuilding your startup disk). It's all up to the latest too right? 104.11 or or 10.5.2, and QT 7.4.1? FCP 6.0.2, right?
    Jerry

  • Why does it take so much longer for applications to launch under lion as compared to snow leopard

    I have two iMacs one which cannot run Lion and one which does.
    Launching applicaitons under Lion takes a measurable amount of time longer to launch under Lion than they do under Snow Leopard.
    The Lion machine is newer, faster and larger than the Snow Leopard machine - 4 cores vs 2, however, every time I launch an application, such as Safari or Text Exit as two examples, the Lion machine just cranks and cranks (you can listen to the disk drive).
    Text edit is particularly rediculous. If I try to open a text file, either for the first time or one which has been opened by text edit before, I am greeted with the sound of the disk drive and the spinning beach ball.
    All hardware diagnostic tests pass with flying colors. Or so it appears as no errors or abnormalities are reported.
    This effect has been in place since the lion machine arrived (which was "factory installed" with Snow Leopard and then upgraded over the net to Lion).

    That is not normal, but what is going on is hard to say without some testing.  It could be cache-related, if you've gotten some corruption in some important caches.  Try getting a copy of OnyX and clearing caches.  (Note that cache clearing should be considered a troubleshooting step only...  don't use such utilities for routine maintenance.)
    You could also have a dying hard drive.  That would not necessarily show up on hardware tests.  Sometimes drive failures show up in advance in hardware tests or SMART status checks, and sometimes they don't.  That could explain the excessive hard drive thrashing.  If this is the problem, there may not be any reasonable solution until the drive finally goes kaput, or decides to change to a detectable imminent failure.
    There could also be any number of other problems, such as low RAM, hard drive directory corruption, incompatible third-party software, etc.  Try some of the techniques in the Mac OS X Speed FAQ.

  • How to seperate the access for two identical databases from two application

    First I have to say I'm sorry... Oracle and the oracle architecture are totally new for me. However I hope to get some help with this.
    We have one Oracle 10g server and a database name A with table name X, Y and Z, for Application AA with access for property file AAA.
    The server capacity are almost not being used.
    Here are my thought, how can I add a database name B with table name X, Y and Z (yes same tables as in database A) data for application BB with access for property file BBB.
    how can I seperate the 2 property files (question: on a port number?), so in case there by a mistake should be switch around on 2 property files, it then is impossible to access the date from Application AA to date in database name B.
    Password on Database A (incl table) and Database B (incl table) are the same.
    Is there any solution to this?

    What I would like to do is make use of the resource on one machine.
    I have several similar applications, databases, tables and password where data should be totally separated from each other. however I would trying to prevent that there could be any data access from Application AA to Database B in case there should be a switch of property files
    I'm familiar with Sybase environment, however isn't there some thing fancy in oracle there can seperate to almost identical applications to access other databases

  • IMovie 08 takes twice as long to produce inferior output

    I'm using a Sony HC42 miniDV camera. It records in wide screen format.
    In iMovie 6 it takes 9 minutes to save a QuickTime movie of about 2-1/2 minues duration. In iMovie '08 it takes 18 minutes to save the same movie.
    The QuickTime from iMovie 6 file is much better quality, perhaps because it uses the true resolution of the source material which is 869x480 pixels. iMovie 08 insists on converting the video capture to 960 x 540.
    Samples of both can be seen here:
    http://www.bmumford.com/tmp/imovie/

    Bryan Mumford wrote:
    I'm using a Sony HC42 miniDV camera. It records in wide screen format.
    In iMovie 6 it takes 9 minutes to save a QuickTime movie of about 2-1/2 minues duration. In iMovie '08 it takes 18 minutes to save the same movie.
    The QuickTime from iMovie 6 file is much better quality, perhaps because it uses the true resolution of the source material which is 869x480 pixels. iMovie 08 insists on converting the video capture to 960 x 540.
    Samples of both can be seen here:
    http://www.bmumford.com/tmp/imovie/
    wow.. thanks for the comparison.

  • Why AME takes twice the time for the same conversion?

    Hi all!
    Yesterday I made a video conversion with Adobe Media Encoder CS6 and it took about half the time it is taking now...same file, same conversion, same machine, same tasks, double time...WHY???
    Thank you in advance.

    Please, help me. I need an immediate response so I could try to fix the problem because I need to use my laptop right away. Pls help.

  • Difference in LOCL print preview for same script in two different systems

    Hi All,
    When I am testing a dunning letter ( Custom sapscript) in my testing system the LOCL print preview is correct...When I am testing  it in my development system by taking print preview from LOCL it is not printing a uline and some line item headers...
    There is one text element for printing line item header.
    U1....ULINE(73)
    T0    &vline& ....&T_MATNR&..
    T3    &vline&
    UL   &ULINE(73)
    IN Development sytame in print preview every thing is perfect except the above portion the first uline and vline are not getting printed and as a result next vline and uline are dispalyed a bit above .. I am unable to understand why one uline is not printed but the othe one is printed as we are using HELVE12 in both cases and above all  why in test system this problem is not occuring..
    I checked and am 100% sure there is no difference between the layout versions in the two sapscripts...Also checked most of the SPAD configs in two systems and found them same..
    Can you give me any idead about the reason for the diffrence in print preview as in both cases it will consider the printer installed on the local desktop....
    Just we use citrix metaframe to log in SAP but that should not be the reason as thne problem would be in both system..
    Please help me out...
    Thanks and Regards
    Sweta

    Hi ,
    I already mentioned that I am selcting LOCL ( Device type Sapwin)  in both cases so in both cases it is considering the printer installed on the local system...
    Can anyone tell me specific spad config or anything else which I need to compare in both systems..

  • Query Takes Longer time

    SELECT CAL_EMPCALENDAR.START_DATE as main,
    bit_empname(CAL_EMPCALENDAR.EMPLOYEE_ID) || ' /' ||
    CAL_EMPCALENDAR.EMPLOYEE_ID as secondary,
    TO_DATE('1-4-2006', 'DD-MM-YYYY') as FROM_DATE,
    TO_DATE('30-4-2006', 'DD-MM-YYYY') as TO_DATE,
    bit_empname(CAL_EMPCALENDAR.EMPLOYEE_ID) || ' / ' ||
    CAL_EMPCALENDAR.EMPLOYEE_ID as name,
    CAL_EMPCALENDAR.START_DATE as sdate,
    CAL_EMPCALENDAR.OVERTIME_REASON as OTReason,
    CAL_EMPCALENDAR.POSTED_ON as POSTED_ON,
    TO_CHAR(CAL_EMPCALENDAR.START_DATE, 'Dy') as dayname,
    TAM_GET_ADJUSTED_IN(CAL_EMPCALENDAR.EMPCALENDAR_ID) as adj_in,
    TAM_GET_ADJUSTED_OUT(CAL_EMPCALENDAR.EMPCALENDAR_ID) as adj_out,
    CAL_EMPCALENDAR.SHIFT_ID AS SHIFT_ABBREV,
    CAL_EMPCALENDAR.LATE_IN,
    CAL_EMPCALENDAR.EARLY_OUT,
    CAL_EMPCALENDAR.UNDER_TIME,
    CAL_EMPCALENDAR.OVERTIME,
    TAM_GET_LEAVE_DESC(CAL_EMPCALENDAR.EMPCALENDAR_ID, 'ALL') Leave,
    CAL_EMPCALENDAR.EMPLOYEE_ID as empid,
    HRM_CURR_CAREER_V.DEPARTMENT_CODE as deptcode,
    BIT_CODEDESC(HRM_CURR_CAREER_V.DEPARTMENT_CODE) as deptname,
    (SELECT shift_id
    FROM CAL_GRPWORKDAY
    WHERE CAL_GRPWORKDAY.calgrp_id =
    (SELECT calgrp_id
    FROM CAL_CALASSIGNMENT
    WHERE employee_id = CAL_EMPCALENDAR.employee_id
    AND CAL_CALASSIGNMENT.START_DATE <=
    CAL_EMPCALENDAR.START_DATE
    AND (CAL_CALASSIGNMENT.END_DATE is null or
    CAL_CALASSIGNMENT.END_DATE >=
    CAL_EMPCALENDAR.START_DATE))
    AND CAL_GRPWORKDAY.start_date = CAL_EMPCALENDAR.start_date) AS shift_id,
    (SELECT max(entry_dt)
    FROM , LV_TXN txn, CAL_EMPDAILYEVENT cale
    WHERE status = 'Approved'
    AND LV_APPSTATUSHIST.application_id = txn.application_id
    AND cale.reference_id = txn.txn_id
    AND cale.empcalendar_id = CAL_EMPCALENDAR.empcalendar_id
    ) AS entry_dt,
    (SELECT ENTITLEMENT + ADJUST
    FROM TAM_ALLOWANCE
    WHERE (WF_STATUS = 'Pending' OR WF_STATUS = 'Approved' OR
    WF_STATUS = 'Verified' OR WF_STATUS is Null OR
    WF_STATUS = 'No Action')
    and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
    AND ITEM_ID = (SELECT ITEM_ID
    FROM TAM_CLAIM_FORMAT
    WHERE SEQUENCE = 1
    and BIZUNIT_ID like 'SG')) F1,
    --TAM_GET_ENT_AND_ADJUSTED(CAL_EMPCALENDAR.EMPCALENDAR_ID, 'SG', 1) F1,                            
    (SELECT ENTITLEMENT + ADJUST
    FROM TAM_ALLOWANCE
    WHERE (WF_STATUS = 'Pending' OR WF_STATUS = 'Approved' OR
    WF_STATUS = 'Verified' OR WF_STATUS is Null OR
    WF_STATUS = 'No Action')
    and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
    AND ITEM_ID = (SELECT ITEM_ID
    FROM TAM_CLAIM_FORMAT
    WHERE SEQUENCE = 2
    and bizunit_id like 'SG')) F2,
    (SELECT ENTITLEMENT + ADJUST
    FROM TAM_ALLOWANCE
    WHERE (WF_STATUS = 'Pending' OR WF_STATUS = 'Approved' OR
    WF_STATUS = 'Verified' OR WF_STATUS is Null OR
    WF_STATUS = 'No Action')
    and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
    AND ITEM_ID = (SELECT ITEM_ID
    FROM TAM_CLAIM_FORMAT
    WHERE SEQUENCE = 3
    and bizunit_id like 'SG')) F3,
    (SELECT ENTITLEMENT + ADJUST
    FROM TAM_ALLOWANCE
    WHERE (WF_STATUS = 'Pending' OR WF_STATUS = 'Approved' OR
    WF_STATUS = 'Verified' OR WF_STATUS is Null OR
    WF_STATUS = 'No Action')
    and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
    AND ITEM_ID = (SELECT ITEM_ID
    FROM TAM_CLAIM_FORMAT
    WHERE SEQUENCE = 4
    and bizunit_id like 'SG')) F4,
    (SELECT ENTITLEMENT + ADJUST
    FROM TAM_ALLOWANCE
    WHERE (WF_STATUS = 'Pending' OR WF_STATUS = 'Approved' OR
    WF_STATUS = 'Verified' OR WF_STATUS is Null OR
    WF_STATUS = 'No Action')
    and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
    AND ITEM_ID = (SELECT ITEM_ID
    FROM TAM_CLAIM_FORMAT
    WHERE SEQUENCE = 5
    and bizunit_id like 'SG')) F5
    From CAL_EMPCALENDAR, HRM_CURR_CAREER_V, CAL_SHIFT, HRM_EMPLOYEE
    Where CAL_SHIFT.SHIFT_ID(+) = CAL_EMPCALENDAR.ACTUAL_SHIFT_ID
    AND (CAL_EMPCALENDAR.WF_STATUS = 'Approved' Or
    CAL_EMPCALENDAR.WF_STATUS = 'No Action')
    AND CAL_EMPCALENDAR.EMPLOYEE_ID = HRM_EMPLOYEE.EMPLOYEE_ID
    --and CAL_EMPCALENDAR.START_DATE between TO_DATE('1-4-2006','DD-MM-YYYY') AND TO_DATE('31-4-2006','DD-MM-YYYY')
    AND CAL_EMPCALENDAR.START_DATE BETWEEN
    GREATEST(HRM_EMPLOYEE.COMMENCE_DATE,
    TO_DATE('1-4-2006', 'DD-MM-YYYY')) AND
    LEAST(TO_DATE('30-4-2006', 'DD-MM-YYYY'),
    NVL(HRM_EMPLOYEE.CESSATION_DATE,
    TO_DATE('30-4-2006', 'DD-MM-YYYY')))
    And CAL_EMPCALENDAR.EMPLOYEE_ID like 'SG' || '%'
    And CAL_EMPCALENDAR.EMPLOYEE_ID like 'SGTAM001'
    And CAL_EMPCALENDAR.EMPLOYEE_ID = HRM_CURR_CAREER_V.EMPLOYEE_ID
    -- AND HRM_CURR_CAREER_V.DEPARTMENT_CODE like 'DPHR'
    --AND HRM_EMPLOYEE.EMPLOYMENT_TYPE_CODE like '$P!{EmploymentType}'
    --$P!{ExceptionSQL}
    --$P!{iHRFilterClause}
    --order by $P!{OrderBy}
    order by main
    Hi all this query takes a very long time to run.
    On the explain plan the The table in bold letter is using full tablescan rest all go for index scanning.
    Table got Indexe on those CLOMUNS REFERREED
    Oracle version 9.2.0.6
    Message was edited by:
    Maran.E
    Message was edited by:
    Maran.E

    Maran,
    With tags and indentation it should be easiest to analyze at least for you :
    SELECT CAL_EMPCALENDAR.START_DATE as main,
           bit_empname(CAL_EMPCALENDAR.EMPLOYEE_ID) || ' /' || CAL_EMPCALENDAR.EMPLOYEE_ID as secondary,
           TO_DATE('1-4-2006', 'DD-MM-YYYY') as FROM_DATE,
           TO_DATE('30-4-2006', 'DD-MM-YYYY') as TO_DATE,
           bit_empname(CAL_EMPCALENDAR.EMPLOYEE_ID) || ' / ' || CAL_EMPCALENDAR.EMPLOYEE_ID as name,
           CAL_EMPCALENDAR.START_DATE as sdate,
           CAL_EMPCALENDAR.OVERTIME_REASON as OTReason,
           CAL_EMPCALENDAR.POSTED_ON as POSTED_ON,
           TO_CHAR(CAL_EMPCALENDAR.START_DATE, 'Dy') as dayname,
           TAM_GET_ADJUSTED_IN(CAL_EMPCALENDAR.EMPCALENDAR_ID) as adj_in,
           TAM_GET_ADJUSTED_OUT(CAL_EMPCALENDAR.EMPCALENDAR_ID) as adj_out,
           CAL_EMPCALENDAR.SHIFT_ID AS SHIFT_ABBREV,
           CAL_EMPCALENDAR.LATE_IN,
           CAL_EMPCALENDAR.EARLY_OUT,
           CAL_EMPCALENDAR.UNDER_TIME,
           CAL_EMPCALENDAR.OVERTIME,
           TAM_GET_LEAVE_DESC(CAL_EMPCALENDAR.EMPCALENDAR_ID, 'ALL') Leave,
           CAL_EMPCALENDAR.EMPLOYEE_ID as empid,
           HRM_CURR_CAREER_V.DEPARTMENT_CODE as deptcode,
           BIT_CODEDESC(HRM_CURR_CAREER_V.DEPARTMENT_CODE) as deptname,
           (SELECT shift_id
            FROM   CAL_GRPWORKDAY
            WHERE  CAL_GRPWORKDAY.calgrp_id = (SELECT calgrp_id
                                               FROM   CAL_CALASSIGNMENT
                                               WHERE employee_id = CAL_EMPCALENDAR.employee_id
                                               AND CAL_CALASSIGNMENT.START_DATE <= CAL_EMPCALENDAR.START_DATE
                                               AND (   CAL_CALASSIGNMENT.END_DATE is null
                                                    or CAL_CALASSIGNMENT.END_DATE >= CAL_EMPCALENDAR.START_DATE))
            AND CAL_GRPWORKDAY.start_date = CAL_EMPCALENDAR.start_date) AS shift_id,
           (SELECT max(entry_dt)
            FROM   LV_TXN txn, CAL_EMPDAILYEVENT cale
            WHERE status = 'Approved'
            AND LV_APPSTATUSHIST.application_id = txn.application_id
            AND cale.reference_id = txn.txn_id
            AND cale.empcalendar_id = CAL_EMPCALENDAR.empcalendar_id) AS entry_dt,
           (SELECT ENTITLEMENT + ADJUST
            FROM TAM_ALLOWANCE
            WHERE (   WF_STATUS = 'Pending'
                   OR WF_STATUS = 'Approved'
                   OR WF_STATUS = 'Verified'
                   OR WF_STATUS is Null
                   OR WF_STATUS = 'No Action')
            and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
            AND ITEM_ID = (SELECT ITEM_ID
                           FROM   TAM_CLAIM_FORMAT
                           WHERE  SEQUENCE = 1
                           and BIZUNIT_ID like 'SG')) F1,
           --TAM_GET_ENT_AND_ADJUSTED(CAL_EMPCALENDAR.EMPCALENDAR_ID, 'SG', 1) F1,
           (SELECT ENTITLEMENT + ADJUST
            FROM TAM_ALLOWANCE
            WHERE (   WF_STATUS = 'Pending'
                   OR WF_STATUS = 'Approved'
                   OR WF_STATUS = 'Verified'
                   OR WF_STATUS is Null
                   OR WF_STATUS = 'No Action')
            and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
            AND ITEM_ID = (SELECT ITEM_ID
                           FROM   TAM_CLAIM_FORMAT
                           WHERE  SEQUENCE = 2
                           and    bizunit_id like 'SG')) F2,
           (SELECT ENTITLEMENT + ADJUST
            FROM   TAM_ALLOWANCE
            WHERE (   WF_STATUS = 'Pending'
                   OR WF_STATUS = 'Approved'
                   OR WF_STATUS = 'Verified'
                   OR WF_STATUS is Null
                   OR WF_STATUS = 'No Action')
            and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
            AND ITEM_ID = (SELECT ITEM_ID
                           FROM   TAM_CLAIM_FORMAT
                           WHERE SEQUENCE = 3
                           and   bizunit_id like 'SG')) F3,
           (SELECT ENTITLEMENT + ADJUST
            FROM TAM_ALLOWANCE
            WHERE (   WF_STATUS = 'Pending'
                   OR WF_STATUS = 'Approved'
                   OR WF_STATUS = 'Verified'
                   OR WF_STATUS is Null
                   OR WF_STATUS = 'No Action')
            and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
            AND ITEM_ID = (SELECT ITEM_ID
                           FROM TAM_CLAIM_FORMAT
                           WHERE SEQUENCE = 4
                           and bizunit_id like 'SG')) F4,
           (SELECT ENTITLEMENT + ADJUST
            FROM TAM_ALLOWANCE
            WHERE (   WF_STATUS = 'Pending'
                   OR WF_STATUS = 'Approved'
                   OR WF_STATUS = 'Verified'
                   OR WF_STATUS is Null
                   OR WF_STATUS = 'No Action')
            and EMPCALENDAR_ID = CAL_EMPCALENDAR.EMPCALENDAR_ID
            AND ITEM_ID = (SELECT ITEM_ID
                           FROM TAM_CLAIM_FORMAT
                           WHERE SEQUENCE = 5
                           and bizunit_id like 'SG')) F5
    From CAL_EMPCALENDAR,
         HRM_CURR_CAREER_V,
         CAL_SHIFT,
         HRM_EMPLOYEE
    Where CAL_SHIFT.SHIFT_ID(+) = CAL_EMPCALENDAR.ACTUAL_SHIFT_ID
    AND   (   CAL_EMPCALENDAR.WF_STATUS = 'Approved'
           Or CAL_EMPCALENDAR.WF_STATUS = 'No Action')
    AND   CAL_EMPCALENDAR.EMPLOYEE_ID = HRM_EMPLOYEE.EMPLOYEE_ID
    --and CAL_EMPCALENDAR.START_DATE between TO_DATE('1-4-2006','DD-MM-YYYY') AND TO_DATE('31-4-2006','DD-MM-YYYY')
    AND   CAL_EMPCALENDAR.START_DATE BETWEEN GREATEST(HRM_EMPLOYEE.COMMENCE_DATE, TO_DATE('1-4-2006', 'DD-MM-YYYY'))
                                         AND LEAST(TO_DATE('30-4-2006', 'DD-MM-YYYY'), NVL(HRM_EMPLOYEE.CESSATION_DATE, TO_DATE('30-4-2006', 'DD-MM-YYYY')))
    And CAL_EMPCALENDAR.EMPLOYEE_ID like 'SG' || '%'
    And CAL_EMPCALENDAR.EMPLOYEE_ID like 'SGTAM001'
    And CAL_EMPCALENDAR.EMPLOYEE_ID = HRM_CURR_CAREER_V.EMPLOYEE_ID
    -- AND HRM_CURR_CAREER_V.DEPARTMENT_CODE like 'DPHR'
    --AND HRM_EMPLOYEE.EMPLOYMENT_TYPE_CODE like '$P!{EmploymentType}'
    --$P!{ExceptionSQL}
    --$P!{iHRFilterClause}
    --order by $P!{OrderBy}
    order by mainNicolas.

  • Deletion Query takes too long

    I have two tables with exactly the same structure. The table 1 gets data and one procedure reads that data and inserts them into another table (table2) for processing them. I have a delete query which is taking too long to execute.
    The query is as follows
    delete
    from events.temp_act a
    where a.chess_ts < (select max(chess_ts) from events.temp_act b
    where a.db_type = b.db_type
    and a.order_no = b.order_no
    and a.acv_no = b.acv_no
    There is a composite index in this table which is (db_type,order_no,acv_no)
    In my procedure, I drop and create the index for faster processing and also analyze the index.
    The above deletion query approximately deletes half the number of total records.
    There is no primary key in the table for the reason that there can be no unique record identifier.
    The query takes nearly 2 hours for deleting about 1100000 records.
    Is there a way to make this query run faster?

    What is the explain plan for this statement? Is the index even being used?
    Is the table analyzed as well as the index?
    Dropping/re-creating the index - not likely to help. I would leave this out.
    Have you tried other variations, like:
    delete
      from events.temp_act
    where (db_type, order_no, acv_vo, chess_ts)
           not in (select db_type, order_no, acv_vo, max(chess_ts)
                     from events.temp_act b
                    group by db_type, order_no, acv_vo);

  • Why does it take. So much longer for YouTube videos to load on my iPad 1st gen. then on my iPod touch?

    Why does it take so much longer for YouTube videos to load on my 1st gen. iPad then on my iPod touch or my laptop?

    This is not the place to make a point. This is a user to user support forum. I do not need instructions about the use and care or alleged failure of cables. At no time did I ever say or imply that you were an idiot, that is your statement and words, not mine. Take the time to Google and you will find instances where there have been injuries and death dealing with 3rd party cables and chargers. The abilities that Apple has for manufacturing and what business decisions they make in creating their products is nothing more than speculation, and that is not allowed under the terms of the forum that you agreed on when you joined here. If you want to rant at Apple, then use the feedback link, www.apple.com/feedback. Other users cannot do anything for you.

  • Query take long time in fetching when used within a procedure

    The Database is : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    Query just takes a second from toad but when used inside a procedure as a cursor it takes takes 3 to 5 minutes.
    Following is the Tkprof information when running from procedure.
    SELECT CHCLP.CLM_PRVDR_TYPE_LKPCD, CHCLP.PRVDR_LCTN_IID, TO_CHAR
    (CHCLP.MODIFIED_DATE, 'MM-dd-yyyy hh24:mi:ss') MODIFIED_DATE,
    CHCLP.PRVDR_LCTN_IDENTIFIER, CHCLP.CLM_HDR_CLM_LN_X_PVDR_LCTN_SID
    FROM
    CLM_HDR_CLM_LN_X_PRVDR_LCTN CHCLP WHERE CHCLP.CLAIM_HEADER_SID = :B1 AND
    CHCLP.CLAIM_LINE_SID IS NULL AND CHCLP.IDNTFR_TYPE_CID = 7
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 110.79 247.79 568931 576111 0 3
    total 2 110.79 247.79 568931 576111 0 3
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 93 (CMSAPP) (recursive depth: 1)
    Rows     Execution Plan
    0 SELECT STATEMENT MODE: ALL_ROWS
    0 PARTITION RANGE (SINGLE) PARTITION:KEYKEY
    0 TABLE ACCESS MODE: ANALYZED (BY LOCAL INDEX ROWID) OF
    'CLM_HDR_CLM_LN_X_PRVDR_LCTN' (TABLE) PARTITION:KEYKEY
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'XAK1CLM_HDR_CLM_LN_X_PRVDR_LCT' (INDEX (UNIQUE))
    PARTITION:KEYKEY
    Execution plan when running just the query from TOAD is: (it comes out in a second)
    Plan
    SELECT STATEMENT ALL_ROWSCost: 6 Bytes: 100 Cardinality: 2                
         3 PARTITION RANGE SINGLE Cost: 6 Bytes: 100 Cardinality: 2 Partition #: 1 Partitions accessed #13          
              2 TABLE ACCESS BY LOCAL INDEX ROWID TABLE CMSAPP.CLM_HDR_CLM_LN_X_PRVDR_LCTN Cost: 6 Bytes: 100 Cardinality: 2 Partition #: 2 Partitions accessed #13     
    Why would fetching take such a long time? Please let me know if you need any other information.
    Thank You.
    Edited by: spur230 on Apr 1, 2009 10:23 AM
    Edited by: spur230 on Apr 1, 2009 10:26 AM
    Edited by: spur230 on Apr 1, 2009 10:28 AM
    Edited by: spur230 on Apr 1, 2009 10:30 AM

    Query just takes a second from toad It's possible that the query starts returning rows in a second, but that's not the time required for the entire query.

Maybe you are looking for

  • Ipod touch has lost LOADS of my videos when connected to my MacBook Pro

    Ok this is a weird one, and it's happened twice now. So I use two macs, my 27" iMac at work which runs snow leopard, and my MacBook Pro laptop that is running Tiger. Now I connect both to my brand new iPod Touch, which is great and has all my videos

  • Can i clone my snowleopard disc from a macbook to a mini

    i've got a mac mini, and i'd like to duplicate everything that's on my macbook...can i do this with something like CarbonCopyCloner, or does snowleopard on the mini differ in some way to the macbook version?

  • Firefox always asks to enable add-on when I restart PC

    Although I have to set to "enable" all of my add-ons in about:addons, whenver I restart PC and open Firefox, it asks me to enable them again! Actually it doesn't remember my settings with the installed addon!

  • How to keep traces of sent sms ?

    Hello, I've just installed 'Nokia PC Suite 7.1.18.0' on my Laptop. If I'm able to send SMS without any problems, I can't find any traces of these sent sms in PC Suite nor in the 'Sent Items' box on my mobile. Is there a way to keep a copy of sms sent

  • Javascript in servlet Problem

    Hi, I am trying to execute a small javascript part in the servlet..The problem is I need to call the javascript function from the middle of the body of html generated by servlet.. catch (AlreadyRegisteredException aEx) {   System.out.println(aEx); ou