Practical limit of number of rows in collections

Hi
I use Apex3 and am thinking of using collections to solve a problem. The issue is, though in average each operation will create less than 1000 rows, there may be cases where as many as 100k rows will need to be created (but they will be very rare).
Basically the user will be able to upload a text file, and each line in the text file will generate a row in a collection, some calculations will be performed for each row and at the end the results will be displayed as a report.
Do you think it is reasonable to use collections in this case, or the number of rows can be create performance problems? Or should I put some limit on the number of rows the users can upload (in this case they will have to break big files in smaller ones)?
Thanks!
Luis

Keith,
I believe you're confusing the original question. He was referring to APEX collections and not PL/SQL collections.
An APEX collection is a generic table, used to maintain temporary data that is associated with an APEX session. The only physical limit on the number of rows in a collection is disk space. They are not maintained in memory. But remember that this is a real table and not a temporary table, so inserts and updates will generate log and redo. So if you have a 50 users, each creating 100K rows in their APEX session, this would result in a lot of rows and a lot of activity. The database should be able to handle this, but it may simply take some time for you to populate these collections.
Also, create_collection_from_query will normally be much faster than adding members to a collection one at a time.
Joel

Similar Messages

  • How to limit the number of rows in a report

    I have several reports with a number of parameters - date ranges etc.
    Depending on the parameter values selected by the user the reports can return thousands of rows.
    I would like to limit the number of rows returned to, say, 500. If more than 500 rows are returned by the query then display an error message requesting that the user enter more specific parameters.
    Ideally for performance reasons it would be good to catch the error before the datafile is generated, but I don't know if this is possible. Alternatively a check in the template might do the job - using COUNT on the group?.

    Hi Hugh,
    In your query, you got to add rowum < 500 or some sort of DB specific limit to the row being returned,
    this will help to stop the report to get more than 500 records and the report template wont have any restriction.
    or
    you can do that in template too, but i would not recommend.
    In these both cases or in any case, you cannot give any meaningful error if it exceeds N rows,there is no option like this till now.

  • How do I limit the number of rows retrieved at a time using RefCursor?

    I have a PL/SQL package in use, that returns a REF CURSOR. This is currently being used in a Forms 6i application. Now I want to develop an ASP.NET web application that displays exactly the same information as my Forms 6i module. In fact those two applications will be used concurrently for a while.
    I looked at the sample code provided on otn.oracle.com and decided to use the OracleDataAdapter.Fill()-method to fill a dataset and bind that dataset to a pageable GridView. Now I wonder, whether this method retrieves ALL records of the query at once and how I can limit the number of rows fetched? The Select statement retrieves up to 10000 rows at a time. Most of the time, a user is only interested in the first 20-30 rows. Forms 6i fetches more rows as the user scrolls down, how can I implement the same behavior in ODP.NET?
    - Markus

    Excuse me, but the reply does not quite answer my question. Maybe I did not explain my concerns clear enough:
    I understand the use of the two properties (RowSize and FetchSize) to reduce the amount of round trips needed to transfer the data - not the number of rows fetched in total. This would still lead to a situation where all rows are transferred, when I am using the OracleDataAdapter.Fill()-Method. Is this correct or did I misunderstand the function of this method?
    I quote the otherwise really helpful article you send me:
    Of course, there is a cost if the fetch size is arbitrarily large. More client-side memory and processor cycles will be needed to store and manage a larger amount of data. The goal is to find a high-performing balance between the number of round trips and the amount of data retrieved per trip.
    My RowSize is for sure a bit larger than the one in the given example. The query will probably be used by up to 100 users at a time, so I would like to limit the resource-costs not only on the network by the number of round trips, but also on the web-server which is storing all these records in it's memory per user-request.

  • How to limit the number of rows in a smart form , sap script.

    Can anyone tell me how to limit the number of rows in the output of a sap script/smart form. I have tried "protect/endprotect" in sap script but have no idea of how to do in smart form. In sap script the only way it has happened is by reducing the size of the main window.

    Hi,
    In Smartform also, why dont you try reducing the size of the window if you want to limit the rows in it. Also if you are printing Line Items in a LOOP, you can write
    LOOP AT T_ITAB FROM 1 TO N in the LOOP Node if you know how many records exactly you want to display in 1 Page processing.
    regards,
    Mahesh

  • How can I limit the number of rows returned by a select stat

    How can I limit the number of rows returned by a select
    statement. I have a query where I return the number of stores
    that are located in a given area.. I only want to return the
    first twenty-five stores. In some instances there may be over
    200 stores in a given location.
    I know is SQL 7 that I can set the pagesize to be 25....
    Anything similiar in Oracle 8i?
    null

    Debbie (guest) wrote:
    : Chad Nale (guest) wrote:
    : : How can I limit the number of rows returned by a select
    : : statement. I have a query where I return the number of
    : stores
    : : that are located in a given area.. I only want to return the
    : : first twenty-five stores. In some instances there may be
    : over
    : : 200 stores in a given location.
    : : I know is SQL 7 that I can set the pagesize to be 25....
    : : Anything similiar in Oracle 8i?
    : If you are in Sql*Plus, you could add the statement
    : WHERE rownum <= 25
    : Used together with an appropriate ORDER BY you
    : could get the first 25 stores.
    Watch out. ROWNUM is run before ORDER BY so this would only
    order the 25 selected
    null

  • Can I limit the number of rows returned on a Select?

    Can I limit the number of rows returned on a Select statement? I would be using JDBC in a Java program.

    Use Java prepared statements with the equivalent of this SQL*plus script:
    VARIABLE n number
    EXEC :n := 3;
    SELECT rownum FROM all_objects WHERE rownum <= :n;
        ROWNUM
             1
             2
             3
    EXEC :n := 5;
    SELECT rownum FROM all_objects WHERE rownum <= :n;
        ROWNUM
             1
             2
             3
             4
             5

  • Need to know how to limit the number of rows returned on Oracle

    MS SQL Server has a command called 'set row count'.
    We are trying to find similar one on Oracle.
    What we are trying to do is that instead of using rownum in the query statement, we would like to find way to limit the number of rows returned. I understand that we can use JDBC resultSet object, but that's not what we want.
    I know Oracle has one called arraysize, but this would not limit the number of rows returned either.
    Pease help.
    Thanks

    I understand that we can use JDBC resultSet object, but that's not what we want.I'm not sure which feature of ResultSet you use and which not.
    But if this question has anything to do with JDBC (that's the forum where you put it), I'd recommend to use Statement.setMaxRows(). This will limit the count of rows which your statement will fetch into it's ResultSet.

  • How do you limit the number of rows return from query?

    How do you limit the number of rows return from query? Do all databases support this kind of feature?

    i think the standard is limit
    to get the top 30
    select * from mytable LIMIT 30;returns the first 30 rows
    also if you want a range
    select * from mytable LIMIT 10,30;returns 30 rows starting from 10
    this last one is useful for displaying ranges... something similar happens in these forums when viewing topics and messages

  • How to limit the number of rows in the Custom Control box

    Hi All,
    In my Module pool screen I have a Custom Control box for providing some free text as input. Now, there is no limit in the number of rows allowed for this box.
    But, the requirement is, it should have the maximum number of rows = 99. and each row should have maximum length = 60 characters.
    User should not be allowed to enter more than 60 characters per row and more than 99 rows.
    Could you please let me know how to do this..? Are there any methods available which controls the maximum number of rows and maximum length per row..?
    Please help me in resolving the issue. Thanks in advance.
    Thanks & Regards,
    Paddu.

    By "Custom Control Box", do you mean a Custom Container or a Table Control?
    Anyway, I suggest you to use a table control (not a custom container as your requirement seems to be very precise on that point, maybe ask your client twice to make sure). Look at the examples of table controls in ABAPDOCU transaction.

  • How can I limit the number of rows in Oracle?

    Hi All,
    I am using very complex query where I join 6 table to fetch data from database.
    I have requirement like fetching a first 10000 row and then fetching another records after 10000 and so on.
    I just want to know how to fetch a limited number of rows using sql query. Moreover, I also want to know how to calculate the total number of row (alternative of count method because I don't want to query the database twice because its affect the performance).
    Thanks in advance.
    Regards,
    Sunny

    sunny@oimnewbie wrote:
    Hi All,
    I am using very complex query where I join 6 table to fetch data from database.
    I have requirement like fetching a first 10000 row and then fetching another records after 10000 and so on.
    I just want to know how to fetch a limited number of rows using sql query. Moreover, I also want to know how to calculate the total number of row (alternative of count method because I don't want to query the database twice because its affect the performance).
    Thanks in advance.
    Regards,
    SunnyThis smells like a very fishy requirement based on a fundamental misunderstanding of how Oracle works. Could you explain why you want to arbitrarily limit the result set to 1000 rows? What will happen between that and getting the "next" 1000? What triggers getting the "next" 1000? and how do you define "next", since there is no ordering in a heap table.
    I suspect we can make that requirement go away be presenting a better approach to the real issue.

  • Classic Report limit the number of rows displayed

    Hi All,
    In my application I have a classic Report which show the data of a simple query. For lay-out reasons I want to limit the number of display to 5 instead of the default 15. I've looked in several forums and they told me that I have to set the number of rows in the report attributes.
    But it did not what I want. I'm Using APEX 4.1.0 on a Oracle 11G database
    My question is: How can I limit the maximum number of rows in a classic SQL Report.

    Hamertje16 wrote:
    In my application I have a classic Report which show the data of a simple query. For lay-out reasons I want to limit the number of display to 5 instead of the default 15. I've looked in several forums and they told me that I have to set the number of rows in the report attributes.And did you do so?
    But it did not what I want. I'm Using APEX 4.1.0 on a Oracle 11G databaseHow did it not do what you want? Displayed an error? Displayed no rows? Displayed 15 rows? Displayed some other number of rows? We can only help if we fully understand the nature of the problem.
    My question is: How can I limit the maximum number of rows in a classic SQL Report.To display 5 rows per page set the report's Number of Rows attribute to *5*.
    However, pagination settings get cached for the duration of the session. For this change to be instantly visible, either log out, restart the brower, and log in again, or manually re-request the page from the browser address bar, adding 'RP' in the ClearCache position in the URL.

  • Limit the number of Rows in View Obj

    Hi,
    I use jdeveloper 11.1.1.6.0
    I have a View Obj with more than 100 rows, when I drag it as table in my page, I want to display only 10 first row. I know I can set it in the tuning part of View Obj but I can't use this way,
    because I have more than one instance of this View Obj in Application Module and I want to do it only for one instance.
    I tried to use FetchSize and RangeSize but none of them didn't work
    Habib

    You can setup MaxFetchSize=10 for a particular VO instance in the data model of the ApplicationModule. Go to "Data Model" page of the ApplicationModule definition, select the necessary VO instance and click the button "Edit ..." above the list of VO instances. "Edit View Instance" dialog will open. Go to "Tunning" page of the dialog and configure "Only up to row number" = 10. In this way you will setup MaxFetchSize=10 for this VO instance only. The other VO instances of the same VO definition will remain unaffected.
    Dimitar

  • How to limit a number of rows to be returned in finder method

    are there any way we can specify the # of rows to be returned in a finder method for an CMP? how should we specify that within the xml configuration files?

    Hi
    Sorry to say that u can't do it in the current versions. Only thing u can do is to get all of them and filter them out at the client or servlet layer.
    For exapmle if u get the Enumeration (say 25 objects), and u want to show 10 at a time. Keep a variable that keep track of the page number (eg whether it's the first 10 set of records nor next). Keep the Enumeraton that u got in the session (so that u don't get it everytime). When next is pressed, depending on the value of the varaible storing page number skip those number of records in the Enumeratin (eg if u are going to the second page, the number of records to skip will be 1*10 = 10, and get records form 11 to 20 and so on........
    What do u say.......this is how I did it in an appilaction.........
    Chandan.

  • Limit the number of rows

    Hi,
    If a query is returning 100 rows in a table, but I want to show just 10 and prompt to the next 10 in the next page, how do I do that?
    When I am in the pivot table , in the section properties I saw an option "Insert page break", but it doesn't work.
    Is this the only option I have?
    Thanks and Regards
    Giuliano

    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    add a column with code
    CASE WHEN RCOUNT(1) < 11 THEN ‘1-10′
    WHEN RCOUNT(1) < 21 THEN ‘11-20′
    WHEN RCOUNT(1) < 31 THEN ‘21-30′
    ELSE ‘30+’ END
    and put it in the page section.

  • Practical limit to number of objects?

    Hello. I'm just coming up to speed with Edge Animate, coming from a reasonably proficient history with Flash/AS3.
    My starter project needs to display a large collection of objects. There could be up to 1000 small objects in existence (which could all be visible simultaneously, or not), in a 600x600 stage. Only 3-5 of these will actually be in motion at any given time, and the animations would be very simple, like fade- or fly-in/out. Hundreds of visible objects would respond to mouse events.
    Also, there are only about 20 unique symbols, and some of those could be (but don't have to be) static text instead of graphics.
    Target platform would be tablets and above, no smartphones. (And certainly on tablets, touch events would be simplified significantly due to the lack of fine control.)
    Performance does not have to be liquid smooth, as long as the app begins to respond immediately. Load time is not a large concern, within reason.
    Would this be asking too much of this technology? I know the browser has a great deal to do with the performance, as does the CPU, so I'm looking for more of a "should be OK in most environments" style of answer.

    My recent experiments with canvas on mobile devices seems to indicate that with small numbers of animated objects it does okay, but when the animation gets more crowded it starts to lag...badly. If he's working on a project with a possible 1000 objects, I don't think the mobile browsers are ready to display that with canvas quite yet. I think that's why Edge went with DIV animation, because it can maintain a smooth animation flow on mobile browsers, even with large numbers of animating objects. I agree with you about Edge's limitations, though, and the freedom of working with more pure code. I'm hoping that mobile browsers will eventually get to the point where they can handle the demands of canvas and SVG animations, but so far they seem to choke when you get to the larger numbers of animated objects.
    For my experiments, I generated a cube made up of smaller colored cubes. Each smaller cube had six sides that fluctuated the alpha channel, and when you clicked a cube it popped out of the larger cube and fell offscreen (eventually removing the object when it got offscreen, freeing up the event listeners for that one object). iPhones, iPads, and Android phones differed slightly on how much of this they could handle, but even at a 2x2x2 cube (8 smaller cubes, 48 animating panels) there was some lag. Once you got to larger cube sizes such as 3x3x3 (27 small cubes, 162 panels) the slow-down got really noticeable, and when you popped off a few smaller cubes the animation sped up dramatically. And by a 5x5x5 cube (125 smaller cubes, 750 panels) it was so slow as to be unuseable. Just getting it to recognize a touch event took a massive effort and the pop-off animation took something like a minute.
    I can't really duplicate this test with Edge since I can't figure out how to program this kind of dynamic object placement and animation in their interface just yet...not even sure if it is possible. But I do know that the various div-based animations I've seen produced by Edge and other frameworks (such as CAAT) have been able to animate large numbers of objects with no noticeable slowdown, even on older iPhones. I'm an AS3 programmer like Wigchert, and I'm a bit frustrated that Flash has been given the death-knell by Adobe before these other programs are really ready to fill the void. I don't think there is any "good" answer right now. Edge is kind of where Flash was back in the AS1 days when Director was put on the chopping block.
    Again, this is all just my opinion formed during my search for the next best way to do what I've been doing for years in Flash (and before that, Director). Maybe I just haven't found what other people are using out there to accomplish real dynamically-generated, programming-intensive web animation. CAAT looks promising, and maybe Edge will get it together as well. Until then, I think it's just find something that works for your specific task.

Maybe you are looking for