Limit the Resultset fetch for query executed

We have few reports on our dashboard that return huge amount of data. The query takes a lot of time to return the data.
We wanted to check if there is a way we could control the resultset being returned during the query execution. For example - if our report query returns about 10,000 rows of data but in our report we are initially showing only 1000 and giving user the pagination feature to view the data. Can we control the first time data fetch for the SQL. We want the SQL to fetch only 1000 rows first so that it returns the resultset soon. After clicking on the pagination then the entire resultset can be returned.
We found a variable - VIRTUAL_TABLE__PAGE_SIZE in the NQSCOnfig.INI file. Is this something we need to use or does OBIEE offer any other option?
Please suggest
Thanks.

You can also create an Oracle profile with limited resources and assign it to the Oracle account running the queries (this profile will be used for all queries run by the corresponding user). Resources can only specifed in cpu time (not elapsed time) or logical reads.
See http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/users.htm#15451
and http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_611a.htm#2065932

Similar Messages

  • Limit the process power for particular process

    Hi,
    I would like to know how to limit the cpu process for particular application in Solaris 9.
    Regards,
    WONG

    hi,
    how can i start srm in solaris.
    /usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm
    i found in the above path is directory.
    kindly tell me alternate path.
    Regards,
    Raja

  • Is it possible to limit the execution time for a query?

    I have an application that will run a query to gather statistics. The time window is defined by the user. Since the polling period for data collection varies, it is not possible to say that a large time window will result in a large resultSet. I may have a polling period of 1 minute or a polling period of 1 hour.
    I want to avoid a user executing a query that will consume too many resources and inpact the system's performce in general. Could I stop a query after it takes more that x secs? Is there a way to write an sql statement indicating the max response time? similar to rownum?

    You can also create an Oracle profile with limited resources and assign it to the Oracle account running the queries (this profile will be used for all queries run by the corresponding user). Resources can only specifed in cpu time (not elapsed time) or logical reads.
    See http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/users.htm#15451
    and http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_611a.htm#2065932

  • Can you store the resultSet from a query into a vector?

    I am totally frustrated. How the heck does one store the results of a query (resultSet) in a vector so that I can get the vector from my jsp page to display in a table.? searchRS is my resultSet from stmt.executeQuery().
    public Vector storeResultSet ()throws SQLException
    int dataType;
    Vector rows = new Vector();
    System.out.println("INSIDE SEARCHQUERY VALUE OF searchRS: " + searchRS);
    // Get the ResultSetMetaData. This will be used for the column headings
    ResultSetMetaData rsmd = searchRS.getMetaData();
    // Get the number of columns in the result set
    int numCols = rsmd.getColumnCount ();
    columnNames = new String[numCols];
    System.out.println("inside of store results and column count of rsmd is: " + numCols);
    boolean more = searchRS.next();
    while (more)
    Vector testData = new Vector();
    for(int i=0;i<numCols;i++)
    Object value = searchRS.getObject(i);
    rows.add(value);
    System.out.println("VALUE of testData vector is: " + rows);
    more = searchRS.next ();
    rows.add(testData);
    System.out.println("This is the populated vector in storeSearchResults " + rows);
    return rows;
    }>

    The OP has initiated a new thread asking this question, it's here
    http://forum.java.sun.com/thread.jspa?threadID=5162925
    Please don't created duplicate threads! If you feel you have to create a new thread for this question, post here and explain (as I did) so that no further replies will be posted to this thread.

  • How to limit the mail fetching in ios 7

    hi,
    when i was using IOS 6 in my iphone i could able to limit my mails(office exchane mails) to sync the one day mails alone to save my phone memory, but when i change the ios 7 i cant able to find that setting,and my phone is donwloading all the mails to my phone,
    so can any one help me to find this setting in ios 7, were to limit the mail fetchings in the ios 7 for iphone 4
    best regards
    sureshkumar

    The spell check dictionary follows the keyboard setting.

  • Any way to limit the input format for string control?

    Hi there,
      I need a control for the user to input some string with only alphabets and no special characters. Also need to control the number of characters to input. I search it and see someone use Xcontrol to achieve that but I really have no idea how to get that. Any other way to get this function works on string input?

    prvs wrote:
    Dear Altenbach,
    The VI that you have posted in (Max8Discard.vi) in Limiting Input String Length
    limits the entry of string control to required length but it doesnt limit the entry of special characters.
    If you have any simple way to do the same it will be very helpful
    Thanks in advance...!!!
    Regards,
    Praveen PRVS
    Just change the check after the Lexical Class function.  If you just want numbers and letters, then use the In Range & Coerce function to check for class numbers 3 through 5.  Play around with the logic some more until you get what you need (I'm thinking that AND should be an OR).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Saving the data fetched for scheduled Crystal Reports

    We have requirement to schedule report generation . An rpt will be provided as input to scheduler and whenever the schedule is triggered , the rpt should run to fetch data from database (without viewing the report ) and save rpt with fetched data on the file system in rpt format. Is there an API in SDK that provides this functionality?

    "Scheduling" is available only in CR Server or BOE suite of products. You can "export" the report to disk instead. This will run the report to fetch data and save it to disk with data. Here is an example code:
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.lib.*;
    import com.crystaldecisions.sdk.occa.report.exportoptions.*;
    import java.io.*;
    public class JRCExportReport {
         static final String REPORT_NAME = "JRCExportReport.rpt";
         static final String EXPORT_FILE = "C:\\myExportedReport.pdf";
         public static void main(String[] args) {
              try {
                   //Open report.               
                   ReportClientDocument reportClientDoc = new ReportClientDocument();               
                   reportClientDoc.open(REPORT_NAME, 0);
                   //NOTE: If parameters or database login credentials are required, they need to be set before.
                   //calling the export() method of the PrintOutputController.
                   //Export report and obtain an input stream that can be written to disk.
                   //See the Java Reporting Component Developer's Guide for more information on the supported export format enumerations
                   //possible with the JRC.
                   ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
                   //Release report.
                   reportClientDoc.close();
                   //Use the Java I/O libraries to write the exported content to the file system.
                   byte byteArray[] = new byte [byteArrayInputStream.available()];
                   //Create a new file that will contain the exported result.
                   File file = new File(EXPORT_FILE);
                   FileOutputStream fileOutputStream = new FileOutputStream(file);
                   ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
                   int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
                   byteArrayOutputStream.write(byteArray, 0, x);
                   byteArrayOutputStream.writeTo(fileOutputStream);
                   //Close streams.
                   byteArrayInputStream.close();
                   byteArrayOutputStream.close();
                   fileOutputStream.close();
                   System.out.println("Successfully exported report to " + EXPORT_FILE);
              catch(ReportSDKException ex) {
                   ex.printStackTrace();
              catch(Exception ex) {
                   ex.printStackTrace();
    Edited by: Aasavari Bhave on Oct 29, 2009 2:26 PM
    Edited by: Aasavari Bhave on Oct 29, 2009 2:29 PM

  • Authorization for Query execute

    Hi all.
    I need one SAP BI user to execute all available queries. Are where any Profiles/Roles which I can use for this?

    Answer is here|ROLE in BI NetWeaver to EXECUTE queries

  • Too many results for query

    Hello,
    I'm using Oracle to teach my students database programming with VB.NET (ADO.NET). During my course, I introduce the DataAdapter Configuration wizard of Visual Studio for creating a connection and dataadapter. I'm using OleDb (from Microsoft) to connect to Oracle.
    The problem is that this wizard asks Oracle for all the tables that can possibly be used for a user. When 20 students do this exercise at the same time, the Oracle DB (we use release 9, version 2 on Windows) responds extremely slow.
    I used tracing to search for the query that this wizard generates (using trace files) and I found this one:
    select * from (select null table_catalog, decode (o1.owner, 'PUBLIC', NULL, o1.owner) table_schema, o1.object_name table_name, decode(o1.owner,'SYS',decode(o1.object_type,'TABLE','SYSTEM TABLE','VIEW','SYSTEM VIEW',o1.object_type),'SYSTEM',decode(o1.object_type,'TABLE','SYSTEM TABLE','VIEW','SYSTEM VIEW',o1.object_type),o1.object_type) table_type, null table_guid, null description, null table_propid, null date_created, null date_modified from all_objects o1 where o1.object_type in ('TABLE','VIEW')union select null table_catalog, decode (o2.owner, 'PUBLIC', NULL, o2.owner) table_schema, o2.object_name table_name, o2.object_type table_type, null table_guid, null description, null table_propid, null date_created, null date_modified from all_objects o2, all_objects o3, all_synonyms s where o2.object_type = 'SYNONYM' and o3.object_type in ('TABLE','VIEW') and o2.owner = s.owner and o2.object_name = s.synonym_name and s.table_owner = o3.owner and s.table_name = o3.object_name) tables order by 4,2,3
    Has anybody an idea how I can limit the results of this query? It's not an option to change the query itself, because its executed by Visual Studio, I was thinking to revoke some rights for my student accounts, but I'm no expert, so ...
    PS: my student accounts have standard roles CONNECT and RESOURCE
    thanks in advance,
    Kris Hermans.
    instructor
    http://www.xios.be

    I think you are on the right track with revoking rights. The query you listed refers to all_tables -- which is the list of all the tables that the person executing the query has access to.
    But to accomplish your goal, you would have to know more about the users and roles that they are doing. The view all_tab_privs shows you a list of tables and the privilege level for each grantee. You would have to revoke their select (and other) privs in order to stop them from showing up in the all_tables view.
    But be careful....

  • Open cursors are NOT closed only by closing the ResultSet or Statement

    I've realised that the open cursors are only closed by closing the connection.
    In my example code I have for-loop with a vector of table-names. For every table-name I start a query to retrieve metainformation (row-size, column-names). Although I close the ResultSet (which automatically closes the PreparedStatement/Statement) I reached after the 150th loop a max-cursor-exception (ora-01000) ?!
    It seems that there is only the workaround to close and re-open the connection at the end of the for-loop. Which is performance-side pretty bad :-(.
    Is there really no other solution?
    Besides: does anyone know WHY the statement.close() also closes the ResultSet?? I think this is a bad design (hence to tight dependency between both classes). What if the garbage collector closes the statement (and hence to the JDOC the statement.close()-method also closes the ResultSet)? For example if a method uses a local Statement and returns a ResultSet (and the Statement-garbage is collected), then the ResultSet would cause an exception?!
    Thanks for the help in advance
    Tai

    I've realised that the open cursors are only closed by
    closing the connection.Or by closing the Statement!
    In my example code I have for-loop with a vector of
    table-names. For every table-name I start a query to
    retrieve metainformation (row-size, column-names).
    Although I close the ResultSet (which automatically
    closes the PreparedStatement/Statement) I reached
    after the 150th loop a max-cursor-exception
    (ora-01000) ?!Closing the ResutSet does not automatically close the PreparedStatement/Statement.
    >
    It seems that there is only the workaround to close
    and re-open the connection at the end of the for-loop.
    Which is performance-side pretty bad :-(.
    Is there really no other solution?
    Just explicitly close the PreparedStatement/Statement!
    Besides: does anyone know WHY the statement.close()
    also closes the ResultSet?? You need to think of a resultset as a live connection to the database.
    Consider SELECT * FROM ABIGTABLE, it would be inefficient to populate the Resultset with all of the rows (could even eat up all memory) so the first n rows are returned ( n = Statement.getFetchSize() ) and the next n rows are returned as needed.
    I think this is a bad
    design (hence to tight dependency between both
    classes). What if the garbage collector closes the
    statement (and hence to the JDOC the
    statement.close()-method also closes the ResultSet)?
    For example if a method uses a local Statement and
    returns a ResultSet (and the Statement-garbage is
    collected), then the ResultSet would cause an
    exception?!You should use a statment and resultset, read all your data into a collection or a CachedRowSet (http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html) then close the statment as soon as possible. Never return a resultset form your data tier: that is tight coupling between the tiers of your application!

  • Limit the size of Attachments in Portal

    Dear Group,
    I have a question. We're on SRM 7.0 + EP. In SRM 4+5 it was possible to limit the file size for attachments. Now in SRM 7.0 is not possible in the same way. This is a huge problem as users upload big files which are then sent-out by mail to the approvers. This causes lot's of traffic and some of the attachments even exceeds the file limit for the e-mails. We could easily switch off the send-out but this not what the clients wants to have.
    I know that there is a badi around which can be implemented but I wonder if there is a customizing in SRM which can be used to limit the file size for attachments to a Shopping Cart.
    Any Idea?
    BR Jens

    Hi Krishnan,
    If you look at most of the major documents (FI line items, purchase order, invoice, delivery, etc.) there will be a little dropdown icon in the upper left corner of the screen beside the "Display Document:" title and below the execute button.
    That icon is the 'Services for Object' button. Clicking on it will display a small popup window with several options including one for creating attachment, create note, create external document, etc.
    We want to limit the file size of the attachments to 2mb.  How can we set that limit.
    thanks,
    kbas

  • Variable Screen for query view is hidden

    Hi All,
       I caome across an old query in BW 3.5 which is haiving some mandatory variables. There is a query view for the same query but when i am executing the query view i didn't got any variable screen and its running for some predefined value. How one can hide the variable screen for query view.
       How can i achieve the same for a BI 7 query view.  Please guide.
    Regards:
    Jitendra

    Hi Rakesh,
        What you said is right but my concern is that next time when i open the query view variable screen shouldn't appear ie should run with previously stored variable values. I am working with BI 7 query view. Please guide.
    Regards:
    Jitendra

  • How to limit the number of search results returned by oracle text

    Hello All,
    I am running an oracle text search which returned the following error to my java program.
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    #### ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    java.sql.SQLException: ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    When i looked up the net, one suggestion that was given is to narrow the wildcard query, which i cannot in my search page. Hence I am left with the only alternative of limiting the number of results returned by oracle text search query.
    Please let me know how to limit the number of search results returned by oracle text so that this error can be avoided.
    Thanks in advance
    krk

    Hi,
    If not set explicitly, the default value for WILDCARD_MAXTERMS is 5000. This is set as a wordlist preference. This means that if your wildcard query matches more than 5000 terms the message is returned. Exceeding that would give the user a lot to sift through.
    My suggestion: trap the error and return a meaningful message to the user indicating that the search needs to be refined. Although it is possible to increase the number of terms before hitting maxterms (increase wildcard_maxterms preference value for your wordlist), 5000 records is generally too much for a user to deal with anyway. The search is not a good one since it is not restricting rows adequately. If it happens frequently, get the query log and see the terms that are being searched that generate this message. It may be necessary to add one or more words to a stoplist if they are too generic.
    Example: The word mortgage might be a great search term for a local business directory. It might be a terrible search term for a national directory of mortgage lenders though (since 99% of them have the term in their name). In the case of the national directory, that term would be a candidate for inclusion in the stoplist.
    Also remember that full terms do not need a wildcard. Search for "car %" is not necessary and will give you the error you mentioned. A search for "car" will yield the results you need even if it is only part of a bigger sentence because everything is based on the token. You may already know all of this, but without an example query I figured I'd mention it to be sure.
    As for limiting the results - the best way to do that is to allow the user to limit the results through their query. This will ensure accurate and more meaningful results for them.
    -Ron

  • Use ResultSet in a query - join??

    Hello there,
    I would like to ask if it is possible to use the ResultSet from a query in another query. For example my result set contains some indexes and I want to select the rows from the database whose index is not in the result set. Can I do a join somehow?
    I find ResultSet very restrictive otherwise
    please help
    thanx ;)

    No, you can't use a ResultSet, but you should be able to modify your original query to do whatever it is you need to do. You can do joins in SQL.

  • Limit the matnr matchcode in MMBE (4.7)

    I've been researching this and I'm not finding useful answers.
    We have a client which uses release 4.7, and has requested that we limit the F4 help for MATNR in transaction MMBE.
    MMBE uses the logical database MSM, and in it's selection screen it uses table view MARAV-MATNR with matchode object MAT1.  We already have table T023-BEGRU filled and are trying to use authorization object M_MATE_WGR to limit the materials the use can see in the matchcode.
    Is there any way to copy that matchcode object into a Z one so that we can apply it in MSM ? Is this the way to go?
    Any pointers and ideas will be appreciated.

    I've been playing a little with the user exit that can be configured at TCODE OMSH, and at the SELECT step I execute this form.
    If I use the function F4UT_RESULTS_MAP, I get a record_tab with 288 empty records. If I append manually to record_tab I get an empty help exit which says 288 records but shows nothing. I tried with or without the source structure (declared the same way as ls_data). I've also added fields SPRAS and MAKTG in tcode OMSH.
    I think I'm missing something simple, but I can't figure out what it is.
            DATA: ls_t023 TYPE t023,
            lt_t023 TYPE STANDARD TABLE OF t023,
            BEGIN OF ls_data,
              maktg TYPE makt-maktg,
              matnr TYPE mara-matnr,
              spras TYPE makt-spras,
            END OF ls_data,
            lv_pos LIKE sy-tabix,
            v_tabix like sy-tabix,
            lt_data LIKE STANDARD TABLE OF ls_data,
            wa_fielddescr type dfies.
      SELECT *
        INTO TABLE lt_t023
        FROM t023.
      LOOP AT lt_t023 INTO ls_t023.
        AUTHORITY-CHECK OBJECT 'M_MATE_WGR'
                 ID 'ACTVT' DUMMY
                 ID 'BEGRU' FIELD ls_t023-begru.
        IF sy-subrc <> 0.
          lv_pos = sy-tabix.
          DELETE lt_t023 INDEX lv_pos.
        ENDIF.
      ENDLOOP.
      READ TABLE lt_t023 INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        SELECT makt~maktg mara~matnr makt~spras
        INTO TABLE lt_data
        FROM mara
        INNER JOIN makt
          ON makt~matnr = mara~matnr
        FOR ALL entries IN lt_t023
        WHERE mara~matkl = lt_t023-matkl
          AND makt~spras = sy-langu.
        LOOP AT lt_data INTO ls_data.
          CLEAR pu_record_tab.
          MOVE ls_data TO pu_record_tab-string.
          APPEND pu_record_tab.
        ENDLOOP.
        CLEAR pu_record_tab.
    *    CALL FUNCTION 'F4UT_RESULTS_MAP'
    *      EXPORTING
    *        SOURCE_STRUCTURE         = 'ZF4_MAT1_ESTR'
    **   APPLY_RESTRICTIONS       = ' '
    *      TABLES
    *        shlp_tab                 = pu_shlp_tab
    *        record_tab               = pu_record_tab
    *        source_tab               = lt_data
    *      CHANGING
    *        shlp                     = pc_shlp
    *        callcontrol              = pc_callcontrol
    * EXCEPTIONS
    *   illegal_structure        = 1
    *   OTHERS                   = 2.
        pc_rc = sy-subrc.
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.

Maybe you are looking for