Oracle DBSL -  Determine / Define size of fetch array

Hello guys,
i have a question about the Oracle DBSL and how it determines the size of the fetch array.
I am refering to the following documents / documentations:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/86a0b490-0201-0010-9cba-fd5c804b99a1
Quote:
As long as you do not program an UP TO ROWS in ABAP, the database gets as many table rows as possible per communication set (as many as fit in 32k).
http://help.sap.com/saphelp_nw04/helpdata/en/d1/801f96454211d189710000e8322d00/frameset.htm
Quote:
You have to specify the size of an array before runtime. However, because you cannot know the size of the dataset the system will return, you must define a very large array to avoid an overflow.
To circumvent this problem, the SAP Basis System translates ABAP Open SQL statements into Embedded SQL. To do this, the system defines a cursor.
Ok but the translated embedded SQL code has also to specifiy an array fetch size (how many rows are retrieved by one fetch).
Is this a profile parameter or is it really calculated (how many rows of a specified table would fit into 32k) dynamically in the DBSL?
Regards
Stefan

Hello Michael,
i am refering to the documentation of DEFAULT_SDU_SIZE:
> Use the parameter DEFAULT_SDU_SIZE to specify the session data unit (SDU) size, in bytes to connections.
> session data unit (SDU)
>A buffer that Oracle Net uses to place data before transmitting it across the network. Oracle Net sends the data in the buffer either when requested or when it is full.
Ok, that controls the transmit moment in the network layer.. but not the number of rows which are returned by a single FETCH call (through the OCI). (For example in sqlplus it can be set with set arraysize XX)
I have tested also a little bit around with different sap standard tables in an ERP 2005 system.
I have activated a SQL Trace (ST05) and done a "select * from <TAB>" via SE16 (no count limit!).
In my tests there were fetched different number of rows -  take a look by your own:
Time  Object    Operation  Rows   Returncode
2.451 T100       FETCH     321      0
1.915 T100       FETCH     321      0
1.912 T100       FETCH     321   1406
1.246 E071K      FETCH     109      0
1.218 E071K      FETCH     109      0
1.155 E071K      FETCH     109      0
T100 (4 VARCHAR columns)
E071K (14 columns of different types)
So it seems like the DBSL dynamically calculates the number of rows which can be returned by a single fetch call based on the row size (number of columns and column sizes) and other unknown factors.
If this is true, it would be really great and nothing have to be done by us (the customers!).
But if the DBSL dynamically calculates the max. number of rows per fetch:
Why is a "SELECT * FROM <TAB> INTO <ITAB>" preferred - the SELECT Statement in a LOOP (like in the example) is also fetching the max number of rows by each fetch, or?
The example: http://sap.mis.cmich.edu/sap-abap/abap04/sld017.htm
That was only a notice on some small tests, which i have done.. maybe someone knows it in detail.
Regards
Stefan

Similar Messages

  • NSArray for boolean array, define size...

    Hi!
    I have a Class that I'm trying to create...
    The class have a boolean array that I define the size when the class initialize...
    I put an NSArray in the .h file and I try to define the size of the array on initialisation based on a formula with the parameters for the init method.
    I'm so new to Objective-C, I try to do that the same way I did it in C#..:S
    What should I do?
    Where Can I find information about class definition and sample with int or bool array?
    Thanks!
    Fred

    ShrimpBoyTheQuick wrote:
    Hi!
    I think I understand something here..
    In C, I cannot put an unsized array in the .H file and set the size in the init method in the .m file...
    Kinda true, but you can dynamically allocate memory at runtime to hold an array of whatever size you want.
    What I can do is....
    Define a pointer and a size in the .h file...
    Create an array of the good size in the .m file and put the memory address of the array in the pointer and use this array with the pointer and the size value...
    I don't think the code you posted will work right. I believe the "roomArray" that you're creating inside "initWithWidth" is a local variable that will go away once you exit the "initWithWidth" method. So even though you've stored a pointer to it in "arrayPtr" ultimately you'll be pointing at garbage once that memory gets reclaimed and reused by the runtime system.
    What's my problem after this is how do I tell the object to not used the memory of this array after the method is finished?
    Take a look at this discussion of dynamically allocated arrays in C. Basically you'll use malloc() to allocate memory for your array and then later use free() when you no longer need the array. And since you're dealing with width and height you're needing a two dimensional array which becomes somewhat messier.
    Steve

  • How define size for String of Array ?

    Hai,
    How to define a String of array with size ?
    String[] item={"a","b","c"};
    but before this statement i want give the size for the String of Array
    suppose if i give the size 10
    String [10] item;
    but it's give "Not a Statement Error"
    Please give me an idea !
    Thanks & Regards,
    Merilna

    String[] s = new String[10];

  • 3.1EA2  SQL Fetch Array Size

    When I run an sql query, it will only return the number of rows in SQL Fetch Array size. I cannot scroll any further regardless how many rows the query returns. Version

    Hi Steve,
    This has been reported by users trying jdk1.7.0. I'm not sure if this issue applies to the 3.x releases in general, and I am not aware of any specific effort to certify SQL Developer with Java 7. The standard recommendation is to stay with jdk.1.6.0_xx, where xx=11 or higher.
    Recently I played with u1 (specifically from jdk-7u1-windows-i586.exe) and did not have that particular problem.
    Regards,
    Gary
    SQL Developer Team

  • Is there a way of determining what element in an array is being clicked on?

    Hi all.  I would like to setup an event to determine what element in an array is being clicked on/hovered over.  I think I tried this before and found it wasn't working due to limitations of LV 7.0.  If this code already exists, it would be great if I don't have to do a scavenger hunt for the solution.
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    The second possiblity is to get the on click event, and somehow determine which element in the array it is.  This doesn't sound too difficult as it should be a simple calculation, but may get in to some hairryness based on if the indicies are visible or not, and if I am using a new or old array with new or old control (calc would change based on boarder size of the controls).  I might just simplify it by removing indicies and using older control set which has minimal boarder size.
    And just for fun, can I force a tool tip to show up?
    Thanks all,
    A
    Using LV7.0 on WinXP.

    blawson wrote:
    Been bitten by LabVIEW wrote:
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    Using LV7.0 on WinXP.
    This is indeed possible, at least in the newer versions I use.
    Take the array refnum from the click event data terminal and get a reference to the array element.  This refers to the element that was clicked, but you do need to work out how to get the index.  My method is to use property nodes to get the screen position and size of the element and the screen position and size of the array, as well as the array's Visible Index property. For each direction, take the quotient of the relative position of the element (account for padding!) over the size of an element.
    I suspect that taking the mouse coords and comparing to the array's sizes in pixels is similar, although I trust my method for events that don't have mouseclicks (what coords does Array:shortcut menu selection(User) return if you used the keyboard?)
    Here's an old version I happened to have open.  I've posted about this before, I suspect I have a clearer version in my gallery.  I use this method in my example code contest entry to work out which square of the chessboard is clicked.
    Thank you for that one!
    I am currently "locked up behind a down-rev fence" (working an old app in an old version) so I had not heard of that.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How do I determine the size of an object?

    After an object is instantiated, is there anyway to determine its size (in bytes)?

    Why do you want to know? Java handles memory management for you.
    IIRC for Sun JVM 1.4:
    Objects: four bytes for each reference, boolean, byte, short, int, float or character field, eight bytes for each long or double field, plus sixteen bytes header information.
    Arrays: length * (four for reference, int or float; one for boolean or byte; two for short or character; eightfor long or double), plus sixteen bytes header information.
    Pete

  • How to generate a csv report to determine paper size in a pdf or pdf/a file ?

    how to generate a csv report to determine paper size in a pdf or pdf/a file ?

    Use the cfpdf tag as follows:
    <cfpdf
        action = "getinfo"
        name = "pdf_info"
        source = "C:\temp\testFile.pdf">
    My Operating System is Windows. This tag gets information about testFile.pdf, and stores it in a structure. I have given this structure the name pdf_info. This structure has the key you are interested in, namely, pageSizes.
    Pdf_info.pageSizes is an array whose indices correspond to the respective page number in the PDF. You can use this to generate Comma-Separated Values (CSV) for each page.
    <!--- Initialize CSV list --->
    <cfset csv = "">
    <!--- Add headers or first row, followed by carriage-return --->
    <cfset csv = "Page,Height,Width" & chr(13)>
    <cfloop from="1" to="#arrayLen(pdf_info.pageSizes)#" index="i">
    <cfset row_info = i & "," & pdf_info.pageSizes[i]["height"] & "," & pdf_info.pageSizes[i]["width"] & chr(13)>
    <cfset csv = csv & row_info>
    </cfloop>
    <!--- Output CSV --->
    <cfoutput>#csv#</cfoutput>
    <!--- Write CSV to file --->
    <!--- <cffile action="write" file="C:\temp\output.csv" output="#csv#"> --->
    Done!

  • Two instances of quirky behavior: array size of empty array and tab control freeze

    LV 7.1
    Array size of empty array. Adding empty arrays to an array of higher dimension produces a fantom array of non-zero size.
    Tab control freeze. An event structure with checked 'lock front panel until the event case completes' option permanently freezes the front panel in certain special circumstances.
    Zador

    tst wrote:
     Tell me if you still think this makes sense.
    Whew, let me look at this tonight after I activate the 4D module in my brain.
    (I think it makes sense, though ) Generally I look at the product of the dimensions array to determine if an array is empty. You can initialize a multidimensional array with some dimensions at zero and it is reproduced nicely in the array size output. Also the "Empty array" tool correctly identifies it as empty, even if some dimensions are nonzero.
    Message Edited by altenbach on 03-15-200612:42 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    init.png ‏3 KB

  • Determine Data Size of InfoObject

    Hi,  InfoObject maintenance allows you to specify the data class size of the infoObject. 
    Example:  3 = < 25meg
              4 = > 160 Meg
    Does anyone know how to determine this size?  Is it determined by one specific table or a combination of the the various master data tables?
    Any opinions or experiences are greatly appreciated!

    The procedure is as follows (assuming the backend is Oracle):
    Check the data class in the infoobject (Extras --> Maintain Db storage parameters --> note the data class).
    Check the tablespace assigned to the data class (SE16 TAORA --> note the tablespace)
    Go to DB02 transaction --> Click on the current sizes --> double click on the tablespace --> in object name give the <infoobject name without 0 in case of std delivered> eg: for 0PROFIT_CTR give PROFIT_CTR
    This should give you a list of all the tables and indices with the current sizes. you can also check the growth over a period of time.
    The above procedure should work in most of the cases except the cases where the infoobject refers to different table for text (say for example 0FISCPER refers to T009C for text)
    If the Data class is not populated the you need to find the tablespace by hit and trial method (though usually the tablespace would be PSAPDW2 I think!!)
    Hope this helps
    Thanks,
    Gopal

  • Determine the size of EDI payload data

    Hi Experts,
    As far as my B2B Knowledge is concerned, in order to know the size of an EDI payload... we download the payload from wire message or payload, copy the data and paste it in a file. The size of the file determines the EDI payload size.
    But, this is a tedious task, particularly in cases where there are huge number of EDI data. To far as I know, the size of EDI files ranges from 1 MB to 1GB.
    Please advise what should I do in cases of files with large payload sizes(more than 25MB).
    Please advise if there is any B2B table whose one of the columns depicts the size of the payload.
    I have searched through some b2b table as b2b_messageinstance, b2b.ip_b2b_report but could not find any such columns.
    Please advise what exactly the procedure is to determine the size of EDI payload data, particularly for cases where payload data is larger than 25 MB.

    I am afraid that there is no direct way of finding the payload size in 10g. You may write your own standalone program or API which may calculate the size of payload by querying the b2b_instancemessage view or by calling the B2B InstanceMessage API -
    http://www.oracle.com/technetwork/testcontent/b19324-01-instance-msg-api-129535.zip
    Regards,
    Anuj

  • Apache Installation configure: error: could not determine the size of off_t

    Hi,
    I was installing Apache httpd-2.2.g.tar.gz, i got the below error message while configure.
    checking size of short... 2
    checking for long long... yes
    checking size of long long... 8
    checking for INT64_C... yes
    checking size of ssize_t... 0
    checking size of size_t... 0
    checking size of off_t... 0
    checking which type to use for apr_off_t... configure: error: could not determine the size of off_t
    configure failed for srclib/apr
    gnumake: *** [/net/usr.scratch/i030947/deepak/platforms/sun/cs2/httpd-2.2.8/inst/include/ap_config_auto.h] Error 1
    Regards
    Deepak

    "aparequest.h", line 4: Error: Could not open include file "ap_config_auto.h".
    "httpd-2.2.8/include/ap_config.h", line 25: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr-util/include/apr_hooks.h", line 20: Error: Could not open include file "apu.h".
    "httpd-2.2.8/srclib/apr/include/apr_tables.h", line 25: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr/include/apr_pools.h", line 37: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr/include/apr_errno.h", line 25: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr/include/apr_errno.h", line 52: Error: "{" expected instead of "apr_strerror".
    "httpd-2.2.8/srclib/apr/include/apr_errno.h", line 52: Error: Unexpected type name "apr_status_t" encountered.
    "httpd-2.2.8/srclib/apr/include/apr_errno.h", line 52: Error: statcode is not defined.
    "httpd-2.2.8/srclib/apr/include/apr_errno.h", line 52: Error: Badly formed expression.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 28: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 160: Error: Only one of a set of overloaded functions can be extern "C".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 160: Error: std::memchr(const void, int, unsigned long), returning void, was previously declared returning const void*.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 176: Error: Only one of a set of overloaded functions can be extern "C".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 176: Error: "{" expected instead of "apr_initialize".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 176: Error: Badly formed expression.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 190: Error: Unexpected type name "apr_status_t" encountered.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 190: Error: Badly formed expression.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 192: Error: A declaration was expected instead of "char".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 192: Error: Use ";" to terminate declarations.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 192: Error: "," expected instead of ")".
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 203: Error: Badly formed expression.
    "httpd-2.2.8/srclib/apr/include/apr_general.h", line 214: Error: Badly formed expression.
    "httpd-2.2.8/srclib/apr/include/apr_want.h", line 17: Error: Could not open include file "apr.h".
    "httpd-2.2.8/srclib/apr/include/apr_pools.h", line 158: Error: Only one of a set of overloaded functions can be extern "C".
    Compilation aborted, too many Error messages.
    gnumake: *** [apacsrvstate.22o] Error 1
    Is it because the apache source file is missing ?
    Regards
    Deepak

  • How to determine the size of an InputStream??

    Hello,
    I need to get the size of an inputstream. In fact, I am working with java.nio.channels and need to tranfer a file from within a Jar to the FileSystem.
    I have created a ReadableByteChannel from the jar resource, and a FileChannel from the FileSystem destination. The problem is that to use the FileChannel .tranferFrom(..) I need the size of the src file. But, ReadableByteChannel has no size() method.
    How can I determine the size of this InputStream??
    advanced Thanx
    here is code:
    private void copyResourcesToFileSystem(){
              try{
                        String name = getFileName(); // gets the name
                        ReadableByteChannel srcChannel =
                             Channels.newChannel(this.getClass().getClassLoader().getResourceAsStream(("dtd/"+name)));
                        File newFile = new File(TempDirCreator.getXmlDir(),name);
                        FileChannel dstChannel = new FileOutputStream(newFile).getChannel();
                        dstChannel.transferFrom(srcChannel, 0, srcChannel.size());  // doesn't work -- there is no ReadableBC.size()
                        // lets close the show
                        srcChannel.close();
                        dstChannel.close();
              }catch(IOException x){x.printStackTrace();}
              catch(Exception ex){ex.printStackTrace();}
         }

    In general the "size of an InputStream" is a meaningless concept. It's possible to have an InputStream that never terminates. So if you can't get a size from whatever you're reading from, you're out of luck.
    I missed where you explained why you need the size. I've never felt the need to know how many bytes would be passing through my code when copying from input to output.

  • How to determine the size (in pixels) of the current mode

    Hello.
    I am looking for a was to determine the size (horizontal and vertical pixels) of the current mode (SAPGUI window). I have already looked through the methods provided by class CL_GUI_CFW...
    CL_GUI_CFW=>GET_METRIC_FACTORS provides the size of you display (i.e. 1600 x 1200 pixels) and some other information I am not able to interprete.
    Futhermore I have had a look at the Methods CL_GUI_CFW=>COMPUTEPIXEL, but I don´t know how to use them.
    Has anybody of you any experiences in this topic? I would be grateful ...
    MIKE

    Sorry Manoj,
    but i didn´t find out, why these programs should be able to solve my issue. They just display a picture using the CL_GUI_PICTURE control.
    I am looking fo a way to resize a given control to the very maximum, so that it fills the whole SAPGUI window!
    Thanks anyway...
    MIKE

  • Is there a limit on the size of an array?

    I have two arrays: array1 and array2.
    I have a function that is iterating through array1. If an item in the array matches a particular condition, then that item is pushed onto array2. I can successfully push up to 19 items onto array2. However, if I attempt to push any additional item on top of the 19 items already in the array, then that push fails. Can I not have more than 19 items in an array? Is there any way to increase the size of the array?

    If you are seeing only 20 array elements in the Data Browser it does not mean that the array is limited to 20 elements*. You are perhaps seeing a display restriction in the data browser. Have you checked the actual number of elements in your final array by testing its length property?
    You can change the number of elements displayed in the Data Browser in the ExtendScript Toolkit Preferences on the Debugging page.
    *Note that there are 20 items shown as the first one has an idex of 0.
    Ian

Maybe you are looking for