Execution takes time for the report in Application

I have developed a report for payroll runresult.Its execution time is 3 minutes,but when i run in application it takes half an hour
The query i use is...
SELECT round((sum(nvl(DECODE(PET.element_name,'Basic Salary',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'House Rent Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Transport Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Petrol Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Vehicle Allowance',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Additional HRA',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Other Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Carried Balance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Mobile Allowance',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Fixed Over Time',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Rent Deduction',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'Vehicle Allowance Deducted',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'HRA Deducted',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'Rent Deduction',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'Insurance Deduction',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Medical Insurance',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Family Passage Allowance',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Salik Allowance',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'Family Insurance Deduction',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Fixed Incentive',ROUND(prrv.result_value,3),0),0)) +
sum(nvl(DECODE(PET.element_name,'Company Accomodation Provided',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Mess Deduction',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Normal Overtime',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Special Overtime',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Telephone Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Other Allowance',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Other Earnings',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Other Deductions',ROUND(prrv.result_value,3),0),0)) -
sum(nvl(DECODE(PET.element_name,'Salary Advance Recovery',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Air Ticket Refund',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Vehicle Fines and Charges',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Abroad Emergency Leave',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Abscond Leave',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Air Fare Paid',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Recovery Carried Balance',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Hajj Leave',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Local Leave',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Sick Leave Deduction',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Sick Leave Without certificate',ROUND(prrv.result_value,3),0),0))-
sum(nvl(DECODE(PET.element_name,'Round Off Deduction',ROUND(prrv.result_value,3),0),0))+
sum(nvl(DECODE(PET.element_name,'Round Off Earnings',ROUND(prrv.result_value,3),0),0))),0)Net_Salary,papf.national_identifier groupcode,papf.FULL_NAME,paav.effective_date,
haout.name costcentre,pg.name grade, pj.name designation ,paaf.ASSIGNMENT_NUMBER employee_number,decode(pop.org_payment_method_name,'RI_CASH','C','B')Payment
FROM pay_run_results_v prrv,pay_run_results prr,pay_assignment_actions paa,per_all_assignments_f paaf,per_all_people_f papf,hr_all_organization_units_tl haout,
per_grades pg, per_jobs pj,pay_assignment_actions_v paav,pay_personal_payment_methods_f ppp,pay_all_payrolls_f pap,pay_payroll_actions ppa,
pay_org_payment_methods_f_tl pop,pay_element_types_f PET
WHERE --prrv.assignment_action_id = 49449 and
ppp.assignment_id(+) = paa.assignment_id
AND pop.org_payment_method_id(+) = ppp.org_payment_method_id AND
paa.ASSIGNMENT_ACTION_ID=prrv.ASSIGNMENT_ACTION_ID and paaf.ASSIGNMENT_ID=paa.ASSIGNMENT_ID
and haout.organization_id=paaf.ORGANIZATION_ID
and papf.EMPLOYEE_NUMBER=paaf.ASSIGNMENT_NUMBER
AND prrv.run_result_id = prr.run_result_id
AND ppa.effective_date BETWEEN pet.effective_start_date
AND pet.effective_end_date
AND prr.element_type_id = pet.element_type_id
and prrv.CLASSIFICATION_NAME not like 'Info%'
-- and prrv.element_name not like 'Gross Salary%'
-- and prrv.element_name not like 'Annual%'
and pj.job_id(+)=paaf.job_id
and haout.name=nvl(:P_Dept,haout.name)
and ppa.PAYROLL_ACTION_ID=paa.PAYROLL_ACTION_ID
and pap.PAYROLL_ID=ppa.PAYROLL_ID
and paav.ASSIGNMENT_ID=paaf.ASSIGNMENT_ID
and paav.ASSIGNMENT_ACTION_ID=paa.ASSIGNMENT_ACTION_ID
and pap.PAYROLL_NAME=NVL(:P_PAYROLL_NAME,pap.PAYROLL_NAME)
--and papf.national_identifier = 03917
and paav.effective_date >= TO_DATE ('01-' || :p_start_date, 'DD-MON-YYYY')
AND paav.effective_date <= LAST_DAY (TO_DATE ('01-' || :p_start_date, 'DD-MON-YYYY'))
-- and paav.DATE_EARNED=to_char(:p_date,'DD-MON-YYYY')
and pg.grade_id(+)=paaf.grade_id group by papf.national_identifier,papf.FULL_NAME,paav.effective_date,
haout.name ,pg.name , pj.name,paaf.ASSIGNMENT_NUMBER,pop.org_payment_method_name,papf.employee_number
Cant analyse where it takes time...
Regards,
Mera

I don't think that the "SUM" structure in the SELECT makes a difference in performance (And DO NOT use PL/SQL for this!) And as long as you SUM most PET.element_name values you do not need to filter by them.
But, of course, the solution of "Sven W." would make the code MUCH nicer (took me a while to get it) and the "format" of the join conditions would take anyone ages to maintain that code!
But your problem is that the execution differs massively right?
Do you do the same thing? E.g. bind variables in the interactive part? Do the variables have the same value?
Do you filter on the other variables like "P_DEPT" etc. ?
"and haout.name=nvl(:P_Dept,haout.name)"
The good thing is that you have an execution which makes you happy so you need to compare the SQL and the execution for both. Somewhere must be a difference. (Is the result the same by the way (just in case your parameters differ)?)
If the results and parameters are the same, then do you not work with parameters in the "interactive" test and ORACLE is choosing a different execution plan as it knows more about your question. If that's the case, try to hint the query so that it's using the desired execution plan when you work with parameters.
And how did you get that "execution plan" it's missing so much data and it's not formated. (put around it and check in "Preview" if it looks as desired)
-- andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Execution time for the report.

    Dear All,
    How do i determine the execution time of the report?
    If i need to run some program then please do tell me how can i run the program too?
    Thanks..

    Hi,
    The thread below is telling you how to see query statistics in ST03N.
    Re: BEx Query is executed how many times???
    Regards.

  • Urgent:How to Speed Up the Response time for PDF Report of  500 pages

    hi all
    i am running the 9ias on Solaris and Generating some reports
    Which fetches around 50,000 records and Display them in pdf format.
    When i am ruuning the Query at Database level Response time is Very fast.
    But when i Run the Report in Web Browser same report takes 7-8 minutes.
    So it seems that the Conversion to pdf and Displaying it takes most of time.
    Does any one has idea What parameter's needs to be changed/Caching ??? /
    or any other ways or methods which can be used to Reduce the Response time.
    (its once a monthly Report and User need to Download all the 500 pages as
    a Single Document).
    Any help / suggestion please
    thanks
    jai

    You aren't by any chance calling a function in your repeating frame that in turn goes back and queries the database, are you? If so ... don't. We regularly do 500+ page PDF-file reports, and one thing we discovered early on was that repeatedly going back to the database while generating the report output (in our case, in calculations that were being done on each line of a report) slowed the output down by an order of magnitude. Instead, we now retrieve all the data needed for each report up front (via functions or views called in the initial SQL for the report), and just use Reports to format the output. MUUUUUUUCH faster -- 200 page reports that used to take 15 minutes to complete now complete in just seconds.
    One way you can visually see if this is part of your problem is to watch the report execute in the Report Queue Manager application. If it spends all its time on the "Opening" stage then breezes through each page, this is not your problem. If instead it seems to take a long time generating each page, I'd suspect that this may be at least part of your delay.
    - Bill

  • Execution time for web reports

    Hello every one,
    How to calculate execution time for web reports, for query execution we will go through RSRT, by giving query name and press execute + Debug button then select statistical data & Do not Cache buttons then press enter, after getting output press on back button, we will get duration of the query.....
    But my question is , can we calculate execution time for webreport, if so can you please guide me.
    and can you also tell me , if there is any RRI for one report, how to calculate execution time for these queries.
    Ex : Query ABC have XYZ as its drilldown report , i need to calculate execution time for XYZ report via ABC report.
    Thanks in advance,
    Best Regards.
    NP.

    Hi,
    For reports executed in java web you can add the parameter &PROFILING=X
    to the URL in order to record the execution time. Please have a look at SAP note 1048691 for further information.
    Best regards,
    Janine

  • My folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    my folders take forever to open and then the docs within take a long time for the icon to pop up. the same thing with moving itmes from the desktop to a folder, and also emptying the trashh

    Don't know if that would be a failing hard drive, but it may be that you are out of available space. How much hard drive space do you have available? Please highlight the Macintosh HD icon and then press Command and I for a get info window. Once open, please copy and post the following:
    Capacity:
    Used:
    Available:
    Mac OS requires a minimum of 10 - 15% of total hard drive space available and empty at all times in order to operate properly.

  • When making changes to the I/O buffer size( motu-pci 424) it takes an abnormal length of time for the changes to take affect any ideas?

    when making changes to the I/O buffer size( motu-pci 424) it takes an abnormal length of time for the changes to take affect any ideas?

    A fully loaded one( keep in mind I have had fully loaded projects in the past, and it did not take this long) this was noticed after installing LP8, also major latencey even at 64 buffer size

  • HT204053 i am having iphone3gs and ipod4s, is it possible the application that i have purchased in my iphone can be available in my i pod by doing payment only one time for the same application in my i phone...if yes,plz let me know hw it is possible

    i am having iphone3gs and ipod4s, is it possible the application that i have purchased in my iphone can be available in my i pod by doing payment only one time for the same application in my i phone...if yes,plz let me know hw it is possible..

    Open the App Store on your device.
    Make sure you are signed in with the same account used for the original purchase.
    Tap on Purchased from the bottom navigation bar.
    On iPhone or iPod touch, tap Updates from the bottom navigation bar, then tap Purchased.
    Locate the app in your Purchased tab.
    Tap the download button (cloud symbol)
    See also: http://support.apple.com/kb/HT2519?viewlocale=en_US&locale=en_US

  • Validate/madatory  in order to avoid  long time for the program execution.

    Below is my selction screen.  I would like to do validations for specific fields to make them mandatory fields   as well.
    Could you please suggeste me what are the fields that I can validate/madatory  in order to avoid  long time  for the program  run.
    *Program selections
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-h01.
    SELECT-OPTIONS : o_as4loc   FOR v_as4local,
                     o_ddlang   FOR ddlanguage,
                     o_vkorg    FOR vkorg     MEMORY ID vko,
                     o_auart    FOR auart              MEMORY     ID aat,
                     o_fdnam    FOR fdnam,
                     o_spart    FOR spart   MEMORY ID spa,
                     o_vbeln    FOR vbeln            MEMORY ID aun,
                     o_posnr    FOR posnr,
                     o_matnr    FOR matnr            MEMORY ID mat,
                     o_pltyp    FOR pltyp            MEMORY ID vpl,
                     o_j_3ar    FOR j_3arqda,
                     o_kzr00    FOR kbetr,                       " -ZR00
                     o_kalsm    FOR kalsmasd,
                     o_kmwst    FOR kbetr,                       " -MWST
                     o_kbmen    FOR kbmeng,
                     o_land1    FOR land1            MEMORY ID LND
    SELECTION-SCREEN  : END OF BLOCK b1.
    Thanks in advance.

    Hi,
    Make key fields as well as fields on which there in an index in the database table mandatory.
    Regards,
    Abhijit G. Borkar

  • Currency translation taking more time at first time in the report

    Hi All,
    Here is an issue regarding the currency translation in the report. when we click on the currency translation from the contaxt menu on the report, its taking more time for the first time to get the selection options. But it is fast from the second time onwards. It will be not user friendly if its takes more time for the first time. Is there any way to fast up the processing time for the first time when i go for the "currency translation" option at report level for the first time.
    let me know why it takes more time for the first time when we go for this option at report level.
    Thanks,
    Jack

    Once again from the top.
    This is undoubtedly not a database issue.
    I doubt you can fix it in the database.
    You can, however, spend a lot of hours asking questions and poking around if you are a consultant paid by the hour.
    But as long as you are looking for something to do here are some that won't fix the problem but may be worth a few minutes of your time.
    WHERE 1 = 1Are you kidding? Drop this nonsense. The Oracle optimizer is not brain dead. If it were my database I would also drop the parallel hint like a bad habit.
    /*+ parallel(rp1, 8) */Again the Oracle optimizer is not brain dead. Ask for parallel threads that don't exist and the database will just queue your SQL and let it sit there until sufficient resources become available.

  • Cache entry created a long time after the report runs

    We have a report that results in more than 300,000 records. We get the results for the report in quick time but the cache entry gets created only after sometime, say around 30 mins later or so. Any idea why this delay? Is it that the report caches 25 records at a time (default no. of rows per page) and shows them in quick time and the rest of the records are getting cached in the background? Is there like a way we can optimize this?

    did you check how much time the entire report takes to execute (evn though the first 25 rows comes up quickly). I suspect it is > 30 mins.
    OBIEE is not meant as a data dump tool and there is little that could be done. (except better hardware)

  • What is the minimum trigger hold off time for the 5124

    What is the minimum trigger hold off time for the 5124 i.e. what is the fastest i can collect data without streaming?
    Mark Mutton
    Electrical Engineer

    Good morning Mark,
    Thanks for contacting National Instruments with your issue, we'll try our best to resolve it for you as quickly and efficiently as possible.
    The minimum trigger hold-off time for the NI PXI/PCI-5124 is 2 us with TDC disabled and 10 us with TDC enabled.
    You can take a look at any other trigger specifications for the NI PXI/PCI-5124 below:
    http://digital.ni.com/manuals.nsf/websearch/35D2892B4AC32E5A8625704A00590CFD
    Best of luck with your project.
    Sincerely,
    Minh Tran
    Applications Engineering
    National Instruments

  • SCCM 2012 R2 reporting error: "The DefaultValue expression for the report parameter 'UserTokenSIDs' contains an error: A specified logon session does not exist. It may already have been terminated. (rsRuntimeErrorInExpression)"

    Hi,
    I have two SCCM environments under same active directory domain and one service account have been used for SCCM configurations on both the environments (QA and PRODUCTION). I am facing similar error as mentioned above while trying to fetch reports on
    PRODUCTION site, but the QA site is working fine, though same service account have been used for configuring both. While looking at the reportserverservice_<date> log on my Production DB server i see the following error
    "processing!ReportServer_0-3!2124!01/02/2015-09:09:30:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during
    report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot read the next data row for the dataset DataSet1. ---> System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'Override
    Default' to data type int."
    My DB and SCCM primary site are different and the reorting services point is installed on remote DB server. Please help me resolving the issue.
    Troubleshooting performed:
    1.Disabled the registry key 'EnableRbacReporting' from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\SRSRP to 0 and then restarted SSRS service and the reporting worked for some minutes after that the registry key reverted back to 1 automatically and
    reporting started throwing errors again.
    2. Checked with the permissions on DB whether or not 'sysadmin' role is assigned to the SCCM service account.
    3. re-registered the SQL management Provider WMI class.
    mofcomp.exe “C:\Program Files (x86)\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof”

    Hi All,
    Finally found exact solution to the reporting error.
    Error: while launching SCCM reports (both from Console and web based) an unexpected error occured with error message as "The DefaultValue expression for the report parameter ‘UserTokenSIDs’ contains an error: A specified logon session does not exist.
    It may already have been terminated. (rsRuntimeErrorInExpression)"
    Solution: This is password replication issue for the domain account used to configure reporting services point in SCCM. If your SQL SSRS reporting services instance and databse runs with local default account whereas the reporting services point on SCCM
    primary site is configured with domain account, (As in My case) you need to perform the following in order to get rid of the error.
    Launch 'Reporting Services Configuration Manager' from the SQL SSRS box(either Local or Remote), Connect to Report Server Instance->Go to 'Execution Account' tab->Specify the 'Execution Account' as domain account and password which is used to configure
    Reporting Services Point in SCCM Primary Site, and then click apply.
    Now Lauch the report either way (Web based or from Console), the error will disappear and all your default reports will execute perfectly as before.

  • Parameter REPORT for the Report Web item in the Web template is empty or mi

    Hello,
    I tried to create a Web-Template (WAD). By executing the report, I get the selection screnn, but by confirming the selection I get the following message:
    Web Item Report Error
    Web template error in specifications for the Web item report
    Parameter REPORT for the Report Web item in the Web template is empty or missing
    Use the BEx Web Application Designer to add parameter REPORT to the report Web item in the Web template, and assign a report name to the parameter
    Contact your system administrator. This error was recorded
    What can I do to solve this error?
    Thanks!
    XmchX

    As DP_1 Type Query_view_Data_provider, I have assinged a Query Designer Query wich works fine, if I execute it as QDR.
    The entry Query_view_Data_provider makes sense for me, but what do I need to maintain for the type "Filter"?
    Thanks!
    XmchX

  • Capturing total time for a report..

    Hi all..
    I have a query. Is there a way to capture total time spent to show a report on browser
    If I understand the way it works in OBIEE
    Browser -Presentation Services -- HTTP Request or Response (This we can see by increasing sawlog config file to see more details in sawlog0.)
    Presentation services - BI Server (By Usage Tracking S_NQ_* tables, it gives response time, elapsed time and such statstics)
    BI Server - DB ( The query running time also captured in usage tracking table)
    My understanding is on whole when Presentation services pass the request to BI Server..and when it BI server returns the data to Presentation services..
    There shoud some COMMON PARAMETER to match the request sent and received ..Mapping the requests...
    Is there a way to get that parameter/variable/sytem variable..so that I can accomplish objective of tracking total time spend for a request..
    I could increase saw log and see there is no common parameter that I could match from Sawlog to NQQuery Log, but no luck
    Can anybody help here to find someway? any pointers?
    Thanks in advance..

    There is no parameter that captures the browser rendering time of the report. In the manage sessions if you check the report run time stats you should be able to find the elapsed time, db connect time and compilation time
    To find a more accurate time to render the report and the time when it has become active you can check that information Under Manage sessions in the RPD. That will give the start time and report active time which is the time at which the report is active.
    If you closely monitor this time in the sessions will be a little higher than the time present in the view logs elapsed time which includes the browser rendering time as well because it gives the report active time on it.
    Hope it will be helpful
    thanks
    prash

  • HT3702 i was charged 3 times for the same movie how do i get my refund

    i was charged 3 times for the same movie.

    You can try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via the Store > View Account menu option and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that film and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, about 24 hours).
    Or (and if the 'report a problem' link doesn't work) then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

Maybe you are looking for

  • Can I return my Lenovo S 205 ?

    Hi guys, I have had a multitude a problems since owning my Lenovo S 205 some 8 months ago. I got the laptop via Laptops Direct, an online laptop store. The first problem I experienced was when the laptop kept on shutting down on its own quite a few t

  • Space Designer tutorial ?

    Hi dears, i need to found Space Designer tutorial files, i need for sampling a room. Please help. Thanks in advance.

  • Combining 2 Shipments into 1 Shipment

    Hello, I'm attempting to create the following functionality: -  1 shipment with 5 deliveries (Shipment 1) -  1 shipment with 5 deliveries (Shipment 2) -  1 mass shipment including above 2 shipments (Shipment 3, which is Shipment 1 + Shipment 2) Is th

  • How does BDB update its secondary index?

    I am asking how does Berkeley DB update its secondary index? For example, in a BDB table with key value pair ``<k,v1>``, the index database would have reversed pair like ``<v1,k>``. Upon an insert (or essentially an update) ``<k,v2>``, base table rec

  • Dates in between

    Dear Experts; I have the following sample data below create table t1 Id number(30), date_added date insert into table t1 values (1, to_date('02-02-2013', 'MM/DD/YYYY')) insert into table t1 values (2, to_date('02-04-2013', 'MM/DD/YYYY')) insert into