Sorting makes the report slow

Hi,
I need to sort the SQL (APEX_ITEM) report. I created a hidden item and used the hidden item to sort the report. Its working fine but making the report very slow.
If I remove the sorting, then the report runs fast.
Please let me know what should do to make it faster.
Thanks.

Hi Denes,
Here is my query:
SELECT apex_item.hidden (21, R.pk) || apex_item.hidden (22, R.imo) || apex_item.hidden (23, wwv_flow_item.md5 ( R.PK ,R.RQMT )) ||
apex_item.hidden (24,R.imso)|| apex_item.hidden (25, R.installation_number )|| apex_item.hidden (26, R.base_code) ||
apex_item.text (27, R.year, 80,100,
'style="width:40px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly" title="Year"', 'f27_' || LPAD (ROWNUM, 4, '0')) year ,
apex_item.text (28, R.fcg, 80, 100,
'style="width:64px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly" title="Fcg"', 'f28_' || LPAD (ROWNUM, 4, '0')) fcg,
apex_item.text (29, R.IMO_NAME, 80, 100,
'style="width:90px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Imo"', 'f29_' || LPAD (ROWNUM, 4, '0')) IMO_NAME,
apex_item.text (30, R.IMSO_NAME, 80, 100,
'style="width:96px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly" title="Imso"', 'f30_' || LPAD (ROWNUM, 4, '0')) IMSO_NAME,
apex_item.text (31, R.installation_NAME, 80, 100,
'style="width:140px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly" title="Installation"', 'f31_' || LPAD (ROWNUM, 4, '0')) INSTALLATION_NAME,
apex_item.text (32, R.BASE_NAME, 80, 100,
'style="width:160px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Base"','f32_' || LPAD (ROWNUM, 4, '0'))BASE_NAME,
apex_item.hidden (33, R.FCG_DESC) ||
apex_item.text (34,R.FAC, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Fac"','f34_' || LPAD (ROWNUM, 4, '0')) FAC,
apex_item.hidden (35, R.FAC_DESC)||
apex_item.text (36, R.EFR, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Efr"', 'f36_' || LPAD (ROWNUM, 4, '0')) EFR,
apex_item.hidden (37,R.EFR_DESC) ||
case when
get_PK_status(R.PK) IN ('Edited','Reviewed','Approved') and
:P2_Role = 'EDITOR' then
apex_item.text (38, R.rqmt,80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Requirement"', 'f38_' || LPAD (ROWNUM, 4, '0'))
when
nvl(get_PK_status(R.PK),'X') not in ('Edited','Reviewed','Approved') and
:P2_Role = 'EDITOR' then
apex_item.text (38,R.RQMT,
80, 100,
'style="border:1.3px solid black;width:75px;text-align:right;'
|| 'color:darkblue;font-weight:bold title="Requirement"',
'f38_' || LPAD (ROWNUM, 4,'0'))
when
get_PK_status(R.PK) IN ('Edited','Reviewed','Approved','Disapproved') and
:P2_Role = 'REVIEWER' then
apex_item.text (38,R.rqmt,80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Requirement"', 'f38_' || LPAD (ROWNUM, 4, '0'))
when
nvl(get_PK_status(R.PK),'X') NOT IN ('Edited') and
:P2_Role = 'REVIEWER' then
apex_item.text (38, R.rqmt,80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Requirement"', 'f38_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) = 'Edited' and
:P2_Role = 'REVIEWER' then
apex_item.text (38, R.RQMT,80,100,
'style="width:75px;text-align:right;'
|| 'color:darkblue;font-weight:bold title="Requirement"',
'f38_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) IN ('Edited','Reviewed','Approved','Disapproved') and
:P2_Role = 'APPROVER' then
apex_item.text (38, R.rqmt,80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Requirement"', 'f38_' || LPAD (ROWNUM, 4, '0'))
when nvl(get_PK_status(R.PK),'X') NOT IN ('Reviewed') and
:P2_Role = 'APPROVER' then
apex_item.text (38, R.rqmt,80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold" readonly="readonly"title="Requirement"', 'f38_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) = 'Reviewed' and
:P2_Role = 'APPROVER' then
apex_item.text (38,R.RQMT,80, 100,
'style="width:75px;text-align:right;'
|| 'color:darkblue;font-weight:bold title="Requirement"',
'f38_' || LPAD (ROWNUM, 4, '0'))
end RQMT,
case when get_PK_status(R.PK) = 'Edited' and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid darkred;background-color:yellow;font-weight:bold " readonly="readonly"title="Edited"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
when nvl(get_PK_status(R.PK),'X') NOT IN ('Edited','Reviewed','Approved','NotReviewed','Disapproved') and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid darkred;background-color:#FFF4BF;font-weight:bold " readonly="readonly"title="New Requirement"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) IN ('Reviewed') and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid darkred;background-color:lime;font-weight:bold " readonly="readonly"title="Reviewed"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) IN ('Approved') and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:solid black;background-color:#DAFFBF;font-weight:bold " readonly="readonly"title="Approved"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) IN ('Disapproved') and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:SOLID black;background-color:RED;font-weight:bold " readonly="readonly"title="Not Approved"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
when get_PK_status(R.PK) IN ('NotReviewed') and
:P2_Role in('EDITOR','REVIEWER','APPROVER') then
apex_item.text (39, RU.RQMT, 80, 100,
'style="width:75px;text-align:right;'
|| 'color:SOLID black;background-color:orange;font-weight:bold " readonly="readonly"title="Not Reviewed"' , 'f39_' || LPAD (ROWNUM, 4, '0'))
end NEW_RQMT,
apex_item.text (40, RU.Status, 80,100,
'style="width:75px;text-align:right;'
|| 'color:solid darkgreen;background-color:#FFF4BF;font-weight:bold " readonly="readonly"title="Status"', 'f40_' || LPAD (ROWNUM, 4, '0')) STATUS ,
CASE WHEN (get_PK_status(R.PK) IN('Edited','Reviewed','NotReviewed') and :P2_Role = 'APPROVER') THEN APEX_ITEM.SELECT_LIST(41,'Approved','Approved;Approved,Disapproved;Disapproved','','title="This field is only for Reviewers and Approvers"')
WHEN (get_PK_status(R.PK) = 'Edited' and :P2_Role = 'REVIEWER') THEN
APEX_ITEM.SELECT_LIST(41,'Reviewed','Reviewed;Reviewed,NotReviewed;NotReviewed','','title="This field is only for Reviewers and Approvers"')
ELSE
APEX_ITEM.SELECT_LIST(41,'','','title="This field is only for Reviewers and Approvers"')
END ACTION ,
'<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:3:&SESSION.::NO::P2_PK:'
|| R.PK
|| ''', 1200, 500);">'
|| '<img src="#APP_IMAGES#blue_book_open.gif" title="View Row History" >'
|| '</a>' History
from rplans_sumtab R,
(SELECT PK, RQMT, STATUS, DATE_CREATED FROM RPLANS_USER_SUMTAB R1
WHERE DATE_CREATED = (SELECT MAX(DATE_CREATED) FROM RPLANS_USER_SUMTAB R2
WHERE R2.PK = R1.PK)) RU
WHERE R.PK = RU.PK(+)
2.) The pagination I am using is:
Row Ranges 1-15 16-30 (with set pagination)
3)The table has only 1000 records.
The report runs very fast when I don't use sorting, but when I use sorting, it becomes very slow.
Thanks.

Similar Messages

  • Sorting in dataset vs sorting in the report

    Are the some guidelines on when to use sorting in dataset vs sorting in the report?

    Hi JoeSchmoe115,
    In Reporting Services, we can add ORDER BY clause to presort data that is retrieved for a report in the dataset queries. Or we can sorting groups or sorting by aggregate values in the report. When we add ORDER BY clause to sort the data in the order we want
    it sorted in the report. Presorted data improves report processing time because of the way it is stored in memory. And there are many report processing tasks do not require sorting data before processing it. For example, SUM is not order-dependent and Data
    within group instances is not automatically sorted.
    So sorting groups or sorting by aggregate values is much simpler in the report than in the query and is frequently more efficient also. If we do not need sorted data in the report, do not set sort expressions on the dataset. For more details, please see:
    Troubleshooting Reports: Report Performance
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to make the report run with urls supplied parameters

    I have a report that I send the report's parameters by URL.
    How can I make the report automatically run with the parameters supplied?
    So when the report opens the user does NOT have to click the "View Report" button the report would just run and display the results for the user?
    Thank you for you help.

    Take your iPad to the apple store and explain your problem. They won't make you sit there for an hour to reproduce the problem. I took an iPad back a month ago wit h screen problems. They didn't look at the problem, they just exchange it.
    Again, Apple won't make you stand on your head to reproduce a problem with one of. their produces.

  • How do i make the report in a horizontal form

    Hello,
    How do i make the report in a horizontal form (reports 10g) i cant find that option..
    zanks

    you must set the ORIENTATION under Data model - system parameters to LANDSCAPE
    and under layout model properties of Main section set width and height

  • Does a mixed N and G network make the network slower for the N-enabled?

    Hello all,
    I was just admiring my Airport Extreme box after registering it, and I noticed this bit of fine print:
    "Speed and range will be less if an 802.11a/b/g product joins the network."
    Does this mean that my 802.11g printer makes the network slower for my two 802.11n macbooks?

    Okay,
    For a follow up: I'm using the "guest" network for all my G-level wireless devices, and the regular network from all my N devices.
    Does that overcome the mixed network limitations? It seems like it wouldn't - because the Airport is basically creating two virtual networks out of one network. Or are there two individual networks on the Airport?
    Thanks!

  • Url sorting in the report

    I've a table which contains two columns. The first column is a url and second column is report name corresponding to the url. I generate a htmldb sql report, with these two columns, first column is url and second column is the report name. Since the url name would be long and cryptic, I want to use the report name as display name for the first column also, but the underlying link is still url, which the user can click to generate report. Now, the problem comes when I try to sort on fisrt colunm, which is url and that does not make sense. Is there a way I can click the first column header for sorting, but the sorting should actually happen on second column, which is report name?. Then I can hide the second column and mimic the sorting as it's happening on the url display name. Any ideas are appreciated.
    thanks

    Jonathan,
    All the regions are based on the same SQL query:
    SELECT display_name, url
    FROM url_table
    For the first region (URL Hidden) in the Report Attributes page, I de-selected the 'Show' option for the url column and selected 'Sort' for the display_name column. Then I added a link to the display_name column such that the 'Link Text' was #DISPLAY_NAME#, the 'Target' was URL and the 'URL' was #URL#
    The second region (URL showing) was a copy of the first but without de-selecting the 'Show' option and the third region (URL hyperlinked) was a copy of the second region with the link on the url column instead of the display_name column ('Link Text' = #URL#).
    Hope this makes sense.
    Cheers,
    Bryan.

  • How can i make the report previewer show a PDF file instead of HTML?

    Hi there,
    i made a report which can be called within a form by a button. This report is a PDF-report.
    I also have an option in the application to start the report from the menu. Then i get the Launch Report Form by Headstart. Here i can fill in for Desformat (in the options) PDF and Output to PREVIEW. Still it generates me a HTML report in my browser. How can i make it work so that the PREVIEWER will show me a PDF-report instead of the HTML?
    Kind regards,
    Dave

    You can not use PREVIEW as output type in webbased forms/reports. Try using as output type CACHE or FILE.

  • How to make the report shows only top level steps

    HI,
    I use many subsequences in my tests.  I have no interest to see them in the report.  How can I force the report to show only top level steps?
    Thanks
    Rafi

    I needed to prevent 'Skipped' steps from appearing in my reports.  One way to do this is to override the SequenceFilePostResultListEntry callback in the model.  You do this by clicking on Edit and then Sequence File Callbacks and then find SequenceFilePostResultListEntry in the list and click the Add button.
    Edit your new callback in your sequence file to check for a pre-condition.  In my case I checked for Parameters.Result.Status == "Skipped" since that parameter is set to Skipped, Done, etc. based on the result.
    If the condition was true then my only step in the callback was to set Parameters.DiscardResults = True.  The TestStand model will then throw that result away when it processes the report.  You could add a step for every type of data you wish to discard.
    A second method that is easier to implement, but time consuming, is to select each step you DON'T want in your report and bring up the Properties for that step.  Under the Run Options tab, deselect the Record Results box.  That will keep the results of that step out of the report, but you have to do this for EVERY step you don't want to have reported.  The first approach I provided acts to filter the results.
    If you aren't sure what the Parameters.Result.Status will be, then set a breakpoint after that step is executed and scan the parameters when the sequence is halted there.  You can then detect the actual text used as a result for that step, such as "Done" and can set your pre-condition appropriately.

  • Make the Report RPUAUD00 display a custom infotype field

    Hi Guys,
    I have completed the creation of a custom field in Infotype 0001. However upon running the report RPUAUD00, I cannot see in the detailed output report my custom field created. I'd like to ask If I missed any procedure so I can see that custom field I created in the report RPUAUD00.
    Thanks..

    Hi,
    You need to add the new field in the change document. Find the SPRO path below.
    Tcode SPRO-> Personnel Management-> Personnel Administration-> Tools-> Revision-> Set up change document.
    Br/Manas

  • Unmounting SD card makes the Finder slow.

    I've noticed that since moving to an Intel machine, unmounting an SD card from an external card reader renders the Finder slow in one particular area - when clicking on any of the icons on the Finder's side bar (both the drives above the horizontal divider, and the favourites below) it will take about ten seconds for the contents of the window to update. A reboot will clear this behaviour, but simply re-starting the Finder will not.
    Does this happen to anybody else? If not, perhaps the problem is with my card reader (a cheap "Flash Gear" unit), although this didn't use to happen on my old PowerMac.

    STEP BY STEP INSTRUCTIONS TO RECOGNIZE AND IMPORT MTS FILES. (No help from Apple.)
    After 4 frustrating hours and about 40 useless minutes wasted on Apple Support chat, I figured this out.
    Okay, here are the steps to allow Mountain Lion to see your MTS files on a Panasonic camera SD card and import them:
    Click on your camera SD card.
    RIGHT Click on PRIVATE icon. (This used to be a folder, now it is a Quicktime logo.)
    Pull down command for “Show Package Contents”
    Click on AVCHD
    Pull down command for “Show Package Contents”
    Click on BDMV
    Pull down command for “Show Package Contents”
    Open the folder called STREAM
    There are your MTS files. Select them and copy them to a folder on your hard drive.
    Purchase some type of video converter (I paid 30 bucks for Bigasoft Converter and it works.)
    Import the MTS files into the video converter and set the commands (This is several more steps, which you will have to figure out.) This will take quite a while for large, High Def files.
    Save converted files to your hard drive.
    NOW, finally FCP X will let you import and edit your files.
    Thanks Apple for adding 12 steps where it should take one. “Log and Transfer” or IMPORT.  You should fix this.
    It took me about 4 hours of frustration to figure this out. Apple support chat service was no help at all. The girl in chat had no understanding of video files.
    Thank you Apple, for hiding these files behind your Quicktime logo, thanks for adding extra steps and decreasing productivity. I've been using Macintosh computers since 1987. I would not own a PC, but Apple is not what it used to be. Why would you not just let the .MTS files show without hiding them?

  • How Make the Report Fields Read only

    Hi I have drop down selection in a Report field.After selecting a particular value and submiting it the field should become readonly.

    Hi SanjayBala!
    Create a conditional branch that will be executed if your select list submits (the branch must be conditional. The conditiontype is request = e1 and e1 is the name of your select list). This Branch ought to have a request (lets say select_list_ro). Create a read only condition for your select list (request = e1) that comes to use if the current request is select_list_ro.
    Hope that helps!
    yours sincerely
    Edited by: Florian W. on 03.02.2009 14:04

  • Make the report searchable on a field

    Hi to all
    i have a report,which is being searched on area ,i want the search to allow greater than, less than, and equal to searches.
    thanks in advance.

    I am sure you mean something like this:
    SELECT empno, deptno, ename, hiredate
    FROM emp
    WHERE empno = NVL (:p1_empno, empno)
    AND deptno = NVL (:p1_deptno, deptno)
    AND UPPER (ename) LIKE UPPER (NVL (:p1_ename, '%') || '%')
    AND hiredate >= NVL (:p1_hiredate_from, hiredate)
    AND hiredate <= NVL (:p1_hiredate_to, hiredate)?
    Denes Kubicek

  • What program is used by Trx F110 to make the report text file?

    Hello everybody!
    Do you know what is the program used by trx F110 (Automatic Payment transactions) to create the flat text file in the Operating System? I know that, in case of a payment method 'C' (check), SAP can print the check using the programs that appear at Printout/data medium tab (listed in the Form printing/DME box). But the issue is that the check is printing the street address of the vendor, not the one of the ALTERNATIVE PAYEE, in this case the payee is one of the vendor customers, but the check does not print the customer address.
    I would be glad if I could find the txt file creator program, due the information is sent to the printing program is at this file, so I become able to investigate the behavior of the program. Further beyond: do you know why F110 is not able to print the address of a customer of the vendor when making checks with alternative payee being one of their customers? Thank you and regards!

    What gives you an impression that a seperate program is called to write file at OS level.....it could be the program running behind the F110.....try checking the same...and look for GUI_DOWNLOAD in the program.

  • Does XML approach for passing parameters in the query make the query slow?

    Hi,
    I am using XML approach for passing parameters in a query. This is running very slow but when I pass comma separated values in parameter, it runs very fast.
    So it concludes that we should not use XML approach for passing parameters. Please confirm me that Am I right or wrong?
    I have also googled to clear my doubt but not get solution till now. please help me.
    Regards,
    Sachin

    914014 wrote:
    Hi,
    I am using XML approach for passing parameters in a query. This is running very slow but when I pass comma separated values in parameter, it runs very fast.
    So it concludes that we should not use XML approach for passing parameters. Please confirm me that Am I right or wrong?
    I have also googled to clear my doubt but not get solution till now. please help me.
    Regards,
    SachinShow us what you are doing, create a simple yet complete example we can run on our Oracle instances.
    Then we will know exactly what you mean, and can comment appropriately.
    Cheers,

  • APEX report sorting makes report slow

    Hi,
    I have some reports in APEX that are fast (3 sec) when I have no sorting enabled and they turn slow (20 sec) when I enable column sorting.
    The reports are based on data running over a DB-link, all tables come from the same DB-link. When I launch the queries (with filled in parameters) in SQL+ then it takes no more then 5 sec (with or without sorting). The result is about 1000 to 2000 records (only showing 25 in the report with pagination).
    How can I make the report fast (less then 5 sec) with sorting enabled?
    Is there any known bug in APEX that is the source of my problem?
    Thanks in advance.

    Good point, but I already have recreated the report (delete and recreate) with no result. Cause I know that sometimes the reports run slow, cause they are somehow confused with the sorting, and in most cases it helps to recreate the report (which resets the report ID, so that it's like clearing the user preferences).
    First I thougt it had to do something with the user preferences, but I think that it is something different.
    I really don't know how to explain the time difference between SQL+ and APEX.

Maybe you are looking for