Scrollable Cursor Vs Cursored Stream

While working with streams in Toplink, are there any general guidelines? I mean the scenarios in which Cursored stream is beneficial and the scenarios in which Scrollable cursor is beneficial.
From the outset it appears to me that Scrollable cursor is a better option, because i see that Cursored Stream always generates an additional count(*) query when i retrieve the total size of the cursor and because of this takes more time as compared to a Scroallable cursor.
Thanks in advance for any information on this.

The cursored stream must use a separate query to figure out its size. The scrollable cursor can simply scroll to the end and then scroll back. Scrolling to the end and then back is typically less efficient then a separate count(*) query.
Doug

Similar Messages

  • Get plot number for cursor in "Cursor Plot" = -1 mode (snap to any plot)

    I have a XY graph with multiple plots. For my cursors the "Cursor Plot" property is set to -1 so that the cursor can snap to any of the plots. My problem is that I need to get the plot number the cursors is currently associated with. HOw can I do that?
    thanks for any tips!
    klaus

    Hi Klaus,
    there is a property node for that.
    I've attached an example.
    Regards
    DianaS
    Attachments:
    XYPlot Cursor.vi ‏18 KB

  • R : Fetch Cursor - Select Cursor

    Scenario I
    - use an OPEN Cursor, Fetch Cursor and specify the MAXROWS parameter as
    200, FORTE returns me only 1 row.About Scenario I: you MUST surround your open-fetch-close cursor cycle by a
    begin transaction - end transaction statement.
    That is, your code should appear as follows:
    begin transaction
    open cursor...
    fetch cursor...
    do what you want...
    close cursor...
    end transaction.
    Hope this helps.
    Greetings.
    Cristina Tomacelli - CSI Piemonte
    Corso Unione Sovietica, 216 - 10134 TORINO - ITALY
    E-mail address: [email protected]
    Telephone Number: +39-11-4618387
    Da: Bala Cuddalore
    A: blunda; chiaberto; tamietti; tomacelli; forte-users
    Oggetto: Fetch Cursor - Select Cursor
    Data: gioved 13 marzo 1997 19.42
    Hi Folks,
    I am using a PREPARE to dynamically create a SELECT statement. when I
    Scenario I
    - use an OPEN Cursor, Fetch Cursor and specify the MAXROWS parameter as
    200, FORTE returns me only 1 row.
    Scenario II
    - use a SELECT using the prepared select statment, the number of rows in
    the Dataset returned by FORTE is 0.
    Am I doing something wrong here ? missing any step? We are running
    on ver 2.0.h.0.
    Any help is greatly appreciated.
    Thanks a bunch,
    Bala Cuddalore
    [email protected]
    Sage Solutions
    1360 Sacramento
    Suite 1360
    San Francisco CA 94111

    I had this problem and solved it by wrapping the OPEN, FETCH, & CLOSE
    cursor statements in an explicit transaction. I'm sure this is related to
    the dialog duration for the dbSession object you are using.
    Dennis Wetzel
    C/Soft, Inc
    Carmel, IN
    Hi Folks,
    I am using a PREPARE to dynamically create a SELECT statement. when I
    Scenario I
    - use an OPEN Cursor, Fetch Cursor and specify the MAXROWS parameteras
    200, FORTE returns me only 1 row.
    Scenario II
    - use a SELECT using the prepared select statment, the number of rowsin
    the Dataset returned by FORTE is 0.
    Am I doing something wrong here ? missing any step? We are running
    on ver 2.0.h.0.
    Any help is greatly appreciated.
    Thanks a bunch,
    Bala Cuddalore
    [email protected]
    Sage Solutions
    1360 Sacramento
    Suite 1360
    San Francisco CA 94111

  • Sort(Order by)  a cursor by cursor parameter

    Hello,
    I want to make cursor to query three column data, and order by the paramter when calling store procedure. But the cursor did not order by column name at all.
    Any help will be appreciated.
    ggu.
    My package/procedure:
    CREATE OR REPLACE PACKAGE test_PKG AUTHID DEFINER
    AS
    TYPE REF_CUR IS REF CURSOR;
    PROCEDURE test_proc(COLN IN VARCHAR2, OUTCUR OUT REF_CUR);
    END test_PKG;
    CREATE OR REPLACE PACKAGE BODY TEST_PKG
    AS
    PROCEDURE test_proc(COLN in varchar2, outcur out ref_cur) IS
    BEGIN
         IF NOT OUTCUR%ISOPEN
         THEN
              open OUTCUR FOR
              SELECT      CPS.PYROL_ID,
                   CPS.VEND_ID,
                   CPS.CONT_ID
              FROM      EPRS.CNTRCTR_PYROL_SUBMIT CPS
              ORDER BY COLN; <------What should be here?
         END IF;
    end test_proc;
    end test_pkg;
    var results refcursor;
    execute test_PKG.test_PROC('Vend_ID', :results);
    print results;
    It gave me results:
    PYROL_ID VEND_ID CONT_ID
    193 06883 009214070
    196 11756 202101064
    205 06507 072202046
    206 06507 042202046
    207 06507 032202046
    208 06883 012202046

    I could make the question more clear;
    I want to query a table, for example, with three columns. The query results should be sorted by one specific column. I want to leave the column to be ordered by as a parameter, how to implment it?
    Thanks.

  • Email/when I forward a message, after I enter a email address the cursor the cursor comes back below and slightly under the one I just entered, not at the endso I can add another address

    If I forward a email when I enter an address the cursor does not stay of the last entry but will return slightly below and at the begining of the address not at the right for another address to be added

    When you hit edit and forward it, you actually forward the message as a text message, not as an email. So probably you have that email address as your iMessage address as well. That's why you get the forwarded one into your text message box. Is your name/mail address is blue? Which means you send it as an iMessage. When it is green, you then send it as a MMS to an email address.

  • Mixed Signal Graph, Selected Cursors, and Cursor Position Problems

    I'm trying to work around an issue with a single multiplot cursor on a mixed-signal graph (doesn't work right, R&D bug report #100830) by grabbing the selected cursor x-position and updating that position across all four cursors, as seen below:
    However, I'm having two problems. 
    One, the selected cursor is not always the actual selected cursor.  Quite often, especially when selecting and dragging cursors 3 & 4 (indexed 2 & 3), the selected cursor shows up as 0 or 1.
    Two, and the one I'm more concerned about, is the fact that the four cursors X-positions never completely line up.  In every case, whichever cursor is deemed to be "selected", the other three will align to some point (the same for all three) that is offset from the actual value.  Please note that the X-values in my demonstration are identical (1000 points from 0.001 to 1) so I don't see this as being some snap issue where the value is offsetting to the closest available on the other arrays.
    I've attached my scratchpad demo.vi as an illustration. 
    Any help or insight is appreciated.
    Thanks,
    Mike Webster
    Attachments:
    demo.vi ‏47 KB

    I believe I found where the issue resides at least and a workaround.  This is a problem with XY graphs in general when trying to programmatically control the cursor position.  Somehow, the software goes looking for the nearest point instead of the identical point and has some sort of issue with its search algorithm.  Switching from attempting to match position to copying the cursor 'index' completely cleared up the problem I was having.  In the particular application I'm working on, the four graphs have identically spaced data on the X-axis, so this solution should work fine for me.

  • Cursor Problem - Cursor is not where it should be when used

    Hello,
    IO hope someone here has had the same problem and knows why it is occuring.
    this keeps happening to me on both my laptop and desktop, when I open Photoshop CS4 everything is fine with the cursor, meaning where ever I place the crosshairs of the cursor is where the marque/brush/line/pen will draw from. Then after an hour or so of working when I place the cursor the actual selection place will be below the crosshairs of the cursor, about 10-20 pixels below. This is making it very hard to be accurate. It happens both with tablet and with mouse. Is there a keyboard shortcut I am accidentally hitting? any help is appreciated, this is driving me nuts.
    aloha,
    e~

    This has come up repeatedly in this forum:
    http://forums.adobe.com/message/2195086#2195086
    http://forums.adobe.com/message/1544973#1544973
    etc.
    Please consider doing a forum-search before posting.
    Rotating through the screen-modes (hitting the key F three times) should correct the problem.

  • Cursor within cursor insert problem.

    Hello,
    Am trying to pass a parameter from one cursor to another and making an insert in the 2nd cursor but its not inserting.
    declare
    v_txt_1 varchar2(10);
    v_txt_2 varchar2(10);
    cursor C1 is
    select txt1,txt2 from test1where country='INI';
    cursor C2(p_txt_1 varchar2,p_txt_2 varchar2) is
    select txt1,txt2 from test2
    where old_cat_1=p_txt_1
    and old_cat_2=p_txt_2;
    begin
    for c1rec in c1 loop
    v_cat_1 := 'AA';
    v_cat_2 := 'BB';
    v_cat_3 := 'CC';
    for c2rec in c2(c1rec.cat_1,c1rec.cat_2,c1rec.cat_3) loop
    insert into chnl_ini_test (new_cat_1,new_cat_2,new_cat_3,remarks) values (v_cat_1,v_cat_2,v_cat_3,'CATEGORY not found');
    end loop;
    end loop;
    end;
    END;
    the block gets executed but the insert is not happening. am not getting any error. if I place the insert below the first for loop then the insertion is happening.
    Any suggestions plz.

    Looking at the example code, it seems that the values to be INSERTED are not taken from the cursor.
    Instead we just want to insert the same values multiple times based on the no. of rows returned from the cursor c2 and c1.
    If that is the case :
    * Query for both cursor c1 and c2 can be Merged.
    * Count the no. of rows returned.
    * Use FORALL to insert all the records in one shot.
    DECLARE
        v_txt_1 VARCHAR2(10);
        v_txt_2 VARCHAR2(10);
        w_count PLS_INTEGER;
    BEGIN
        SELECT
            COUNT(*)
        INTO
            w_count
        FROM
                SELECT
                    t2.txt1,
                    t1.txt2
                FROM
                    test2 t2,
                    test1 t1
                WHERE
                    country  ='INI'
                AND old_cat_1=t1.txt1
                AND old_cat_2=t2.txt2
        v_cat_1  := 'AA';
        v_cat_2  := 'BB';
        v_cat_3  := 'CC';
        FORALL i IN 1 .. w_count
            INSERT
            INTO
                chnl_ini_test
                    new_cat_1,
                    new_cat_2,
                    new_cat_3,
                    remarks
                VALUES
                    v_cat_1,
                    v_cat_2,
                    v_cat_3,
                    'CATEGORY not found'
    END;

  • Cursor in cursor?

    create or notcreate procedure as
    cursor s1 is (select * from sellers);
    cursor s2 is (select * from orders where seller_id=s1.seller_id);
    begin
    null;
    end;
    hi guys! can i do something like that?

    Hi,
    Not exactly.
    You can have a cursor that takes parameters:
    cursor s2 (p_id NUMBER)
    is  select  *
        from    orders
        where   seller_id = p_id
    );You pass the parameters when you open the cursor, e.g.
    OPEN  s2 (s1.seller_id);Often, the only reason for doing nested cursors is that you can't figure out how to do it in one cursor.
    Explain what you're trying to do, and perhaps someone will show you an easier, more efficient way to do it.

  • FF 4 (mac) doesn't display handcursor in all Flash websites. Also all html websites show strange behaviour with cursor. (blinking cursor in nearby div after clicking a button)

    I'm running Mac OS 10.6
    FF4 doesn't display the hand cursor or type cursor in '''all''' flash websites on links/textfieldss when it should. Highly annoying and disgracing all flashcontent.
    Also with html websites I experienced strange cursor behaviour with FF4. Although it's hard to reproduce the problem. It's very inconsistent.
    I have the feeling in general FF4 should look into it's cursor behaviour on all possible platforms. Mainly Flash.

    I replicated the typing cursor problem on the popular FB. Just click e.g. "x people like this", you'll see you get a blinking type cursor in the "close" button.

  • Cursor bug (cursor work but looks like frozen beach ball)

    I'm running 10.6.2 on a 3ghz core duo imac. I have two accounts on the machine and it's only happening on one side. The cursor will not change back to a normal arrow until i launch an application like firefox. I repaired the disc and permissions. didn't make a difference. Any clue what this could be? should i delete some prefs/plists?

    Is this bug system-wide or do you only notice it in the Finder?

  • Set wait Cursor allows cursor to Clicon on Button ?

    Sometimes when i set my cursor to wait cursor still it allows me to click on Components Like JButton or Tree node 7 sometime it works perfectly (it doesn't allow to click which i am expecting)

    I can assure you that it has nothing to do with you setting the wait cursor; you are only setting the graphic, it doesn't change the way your application behaves on mouse clicks. More likely is that "sometimes":
    1) your application is doing a lot of work
    2) it is doing this work on the Swing EDT
    3) and such your application is unresponsive, giving you the idea that you cannot click buttons
    If you want to prevent users from clicking buttons, you need to disable the buttons while you are doing whatever it is you are currently setting the wait cursor for.

  • Busy cursor - two cursors displayed over the TextField

    Hi all,
    first I describe the situation. When busy cursor is activated in Flex application, when the service is loading data from backend, then the clock or whatever you set can be displayed instead of the mouse arrow icon. But when you are over the TextField, then the busy cursor is displayed and over the busy cursor the additional "text input cursor" is displayed.
    1) Is it possible to get rid of that "text cursor" in the case when busy cursor is activated ? That means show only busy cursor like in other cases.
    2) Is it possible to override CursorManager ? As I did not found any events in the interface.
    Or what could be the solution to this ?
    I did not found any solution like this anywhere. I know how to set my own icon to the cursor, how to start and stop busy cursor manually. But how to override adding the text cursor to the scene only for the case when busy cursor is started and the Service is loading the items from backend and you are over some text component?
    thanks
    regards
    Michal.

    No, it's not mobile app.
    I use SDK 4.5.0
    By text components I mean TextInput for example, but it happens at all the places where "text cursor" is displayed.
    You can check the behavior in the following blog article, when you try the first example and press Toggle button to activate busy cursor and hover the text below. This is exactly what I want to avoid. Two cursors displayed. I don't know what is the version used in the article, but the same happens in 4.5.0
    http://www.flex-blog.com/set-busy-cursor-using-the-cursormanager/
    regards
    Michal.

  • Cursor scope : cursor is not recognising in for loop.

    CREATE or REPLACE PROCEDURE TEST(
    date3 IN DATE,
    Out_Entity OUT Test1.RefCsr
    AS
    FirstNameListTable LIST_TABLE;
    FinalFirstNameListTable LIST_TABLE := LIST_TABLE();
    firstName employee.first_name%TYPE;
    date1 employee.start_date%TYPE;
    date2 employee.start_date%TYPE;
    CURSOR main_cur
       IS
          WITH include_rec
            AS (select first_name,count(1) over (partition by first_name) firstNameCount,start_date  from employee where city='Vancouver')
    SELECT distinct first_name
            FROM include_rec
           WHERE firstNameCount>500;
    BEGIN
        OPEN main_cur;
        FETCH main_cur BULK COLLECT INTO FirstNameListTable;
        CLOSE main_cur;
    FOR i IN FirstNameListTable.FIRST .. FirstNameListTable.LAST
        LOOP
    firstName:=FirstNameListTable(i);
    SELECT min(start_date),max(start_date) into date1,date2 FROM include_rec where first_name=firstName;
    --business logic
        END LOOP;
    OPEN Out_Entity FOR SELECT * FROM TABLE(
                                                    CAST (
                                                            FinalFirstNameListTable AS LIST_TABLE
                                            ) Nos;
    END;
    create or replace TYPE "LIST_TABLE" as table of varchar2(20);
    SELECT min(start_date),max(start_date) into date1,date2 FROM include_rec where first_name=firstName;In above query, getting error:table or view doesnt exit. When i replaced "include_rec" with "employee",error is resolved.But i have to use include_rec,Because i dont want to query on lage table employee, i know my final query output will be subset of include_rec table.
    Means it is clear that cursor is not recognising in for loop and how can i resolve it?

    Can u please tell me code about "creating permanent object or view." in this context. I don't really want to. This is not a route you should be encouraged to go down.
    A view is the correct mechanism for reusing SQL. So I just mean:
    CREATE OR REPLACE VIEW include_rec AS
    select first_name,count(1) over (partition by first_name) firstNameCount,start_date  from employee where city='Vancouver';Then you get rid of "WITH include_rec AS ()..." from both statements.
    But this is pants.
    Surely all this should just be:
    CREATE or REPLACE PROCEDURE TEST (
      date3 IN DATE,
      Out_Entity OUT Test1.RefCsr
    AS
    BEGIN
      OPEN Out_Entity FOR
        SELECT first_name, count(*), min(start_date), max(start_date)
        FROM   include_rec
        WHERE  employee
        GROUP BY first_name
        HAVING COUNT(*) > 500;
    END;
    /

  • Cursor to cursor

    I want to filter a main cursor and transfer filtered rows to another cursor, is this possible, any sample code will help?

    Something like this ?
    declare
      d TIMESTAMP;
      c SYS_REFCURSOR;
      c2 SYS_REFCURSOR; 
    begin
      OPEN c FOR SELECT SYSTIMESTAMP FROM dual;
      FETCH c INTO d;
      dbms_output.put_line( to_char(d,'dd-mm-yyyy hh:mm:ss:ff') );
      c2 := c;
      FETCH c2 INTO d;
      dbms_output.put_line( to_char(d,'dd-mm-yyyy hh:mm:ss:ff') );   
    end;
    28-08-2006 06:08:12:147893000
    28-08-2006 06:08:12:147893000Regards
    Dmytro

Maybe you are looking for

  • System variables in R/3 when badi is triggered from portal

    Hi,    How can we know the action from the portal,i mean from the create expense report i want to throw an error message if the user press "Review" button based on my validation. i have written in the badi,but when the user press "Previous step" butt

  • Check Sysdate for a specified Time

    Hi, I have requirement to check sysdate for particular time in a script,If it has systime is equal to that time in the evening, I need to exit the script and write messages to log file. I am doing the following but it's not working properly, Can anyb

  • Upgraded to OS6 on iPad and now iPhoto doesn't show "Events". What's the deal?

    iPad 2 iPhoto always showed Events but since upgrading to iOS 6, "Events" are gone. What is the fix?

  • Way to control which compiled help appears to user?

    Just to provide a little background--I have been working with Robohelp for years as an author but basically have no technical expertise. I write topics, press buttons in robohelp to generate compiled help, and that's it. So here's my issue: We will b

  • Release untill date in past In QIR

    Hi All, I am facing on problem, The materail has inspction type 01 as active. The QM procurement is active with control key 0000.   The QIR has a setting as NO INPECTION. The release until date in QIR is in past but still the PO was created, When we