COLLECT: Which table is better to use - STANDARD or SORTED?

Hello Performance gurus,
I read this curious fact about COLLECT statement:
In standard tables that are filled using COLLECT only, the entry is determined by a temporary hash administrator. The workload is independent of the number of entries in the table. The hash administrator is temporary and is generally invalidated when the table is accessed to be changed. If COLLECT statements are specified after an invalidation, a linear search of all table rows is performed. The workload for this search increases in a linear fashion in relation to the number of entries.
In sorted tables, the entry is determined using a binary search. The workload has a logarithmic relationship to the number of entries in the table.
In hashed tables, the entry is determined using the hash administrator of the table and is always independent of the number of table entries.
So does this mean if we're populating a table using COLLECT we should prefer STANDARD over SORTED(due to the HASH administration)? Is there any performance overload while setting up the temporary hash administrator for STANDARD tables?
Please enlighten me.
BR,
Suhas

Actually I have just noticed I already had created a test program for this somewhere in the past.
Here are the results:
STANDARD            1.091.295
SORTED              3.159.771
HASHED                994.101
If for the STANDARD table you somehow destroy the hash administration (in this case it was done in the beginning by APPENDing one record):
STANDARD            2.255.905
SORTED                 14.013
HASHED                  8.022
(this 2nd execution was with less rows that the 1st execution, otherwise for the standard table it would take too long).
So this does prove that standard tables can be faster than sorted tables in that special case, but again I would not rely on that.
Rui Dantas

Similar Messages

  • Which browser is better to use as an option to Safari and how do you download it?

    Which browser is better to use as an option to Safari and how do you safely download it? Thanks

    I use Firefox when a site doesn't work well with Safari. Some people like Google's Chrome, but I find it too instrusive and do not trust Google's security. You can download Firefox from firefox.com.
    Regards.

  • c:redirect VS RequestDispatcher -WHICH ONE IS BETTER TO USE?

    WHENVER WE WANT TO ACCESS FILES FROM OHTER APPLICATIONS,WHICH ONE IS BETTER TO USE,<c:redirect> OR
    RequestDispatcher

    Please stop shouting. It is considered rude.

  • , c:redirect OR RequestDispatcher -which one is better to use

    WHENVER WE WANT TO ACCESS FILES FROM OHTER APPLICATIONS,WHICH ONE IS BETTER TO USE,<c:redirect> OR
    RequestDispatcher

    <c:redirect> is the JSTL equivalent of the sendRedirect() method of javax.servlet.http.HttpServletResponse.
    Please see here:
    http://forum.java.sun.com/thread.jspa?forumID=45&threadID=405398 or search the forums for "RequestDispatcher redirect"

  • Which table is better? BSEG or BSIS,BSAK or BSIK

    Hi,
    i want to know whihc table is better for the reterival of data for whether the payment of vendor is done or not?
    Which table should i use for the reterival of data? BSEG or BSIK,BSAK n BSIS.
    I am asking bcoz BSEG is cluster table and it will conatin the data whoes qty is large.
    plzz suggest me whihc tables should i use?
    1 thing i know is there is a field called KOART (A/C Type) = 'K','M'.

    HI to all,
    actaully my problem is i have to display the payment of material document is done or not? in mat. doc there are vendor payemnt also.
    soo i have to display them. dats why i am aksing for these tables.
    I am now able to develop the code for the BSIK,BSAK, N BSIS.
    the problem is when i define AWTYP = 'MKPF', 'RMRB' N 'BKPF'.
    it give s the right data but when i check the MBLNR field which eq to
    AWKEY(10) ,it shows the 'bkpf N rmrp' .
    here's d code:-
        SELECT BUKRS BELNR GJAHR AWKEY BUDAT AWTYP
        FROM BKPF
        INTO (ITBKPF-BUKRS,ITBKPF-BELNR,ITBKPF-GJAHR,
        ITBKPF-AWKEY,ITBKPF-BUDAT,ITBKPF-AWTYP)
        WHERE AWTYP EQ 'MKPF' OR AWTYP EQ 'RMRP' OR  
        AWTYP EQ 'BKPF'.
    I have to do this bcoz i have to show d data for open n clear items.
    Edited by: abaper2008 on Jun 3, 2008 10:14 AM

  • Which one is better to use

    I'm wondering which one of these cases is better to use
    WHERE b.segment1||'.'||b.segment2 in ((select codigo
                                          from tmp.viveres_vegetales)
                                          union
                                         (select codigo
                                          from tmp.genericos)
                                          union
                                         (select codigo
                                          from tmp.hijos_genericos))or
    WHERE b.segment1||'.'||b.segment2 in (select codigo
                                                             from tmp.viveres_vegetales)
               or b.segment1||'.'||b.segment2 in (select codigo
                                                                from tmp.genericos)
               or b.segment1||'.'||b.segment2 in (select codigo
                                                                from tmp.hijos_genericos)

    TRACE and TKPROF/ EXECUTION PLAN will tell you.
    Please read:
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Re: HOW TO: Post a SQL statement tuning request - template posting

  • How to find which table is not being used ?

    Hi,
    I am in need of releasing space from the common schema we have. i have been permitted to drop the tables which has not been used for the last three months.
    Can anyone please suggest how to find the tables that has not been used for a given amount of time.
    Thanks and Regards.
    Rajib

    i have been permitted to drop the tables which has not been used for the last three months.Can I just chip in an observation on this premise? It's not unusual for systems to have processes that run quarterly or even annually. You need to be very careful about dropping "unused" tables - you might just kill your organisations end of year reporting system.
    Is buying more disk space really not an option?
    Cheers, APC

  • Which tables are to be used to select all counters readings in SAP CRM 7.0?

    Hello,
    I need to create a request by SQ01 to extract all counter readings in the database.
    First I've found the table CRMD_MPK_READING but this one does not give the value of the counter.
    It only contains the GUID of the counters, some information about canceling or error flags.
    Could you give some hints to find the table that contains all reading data ?
    Thanks for your help.
    Florent
    Edited by: Florent on Dec 2, 2010 5:48 PM

    Hi,
    In SE11 I look for foreign key for table CRMD_MPK_READING and I found table CRMD_MPK_MPOINT.
    try CRMD_MPK_MPOINT.
    Hope this helps.
    Best regards,
    Caíque Escaler

  • Which one is better to use? Firefox or Safari?

    Thanks!

    Everyone hates this answer, but it's really personal preference. A lot of people really like Firefox because it's open source. Personally, I'm a fan of Safari because it's a native app, so it has support for a lot of features built into Mac OS X. The two features that really set it aside for me, though, are the Reader feature, (which an extension for Firefox actually can replicate, just not well) and the ability to bring up a dictionary definition of any word by pressing Command+Control+D. Those are my two cents. Don't forgot there are other options like Chrome and Opera, too.

  • Which one is better to use..Canvas or J2ME Polish

    Hello Frnds,
    I want to add background images n want to use High level GUI, So is the polish be a good option for it , or should I go for simple j2me canvas n write my own low level... GUI like construct .....or should go for Synclast 3rd party API. library......

    I've J2ME Polish on a few projects, and it can be really nice. But sometimes you just need more, you need pure Canvas flexibility. And for that (and for 90% of my projects) I use synclast. It's a canvas based container toolkit, it allows you to do a LOT with a canvas, and you can also extend it very easily to create your own widgets for the UI.
    http://synclast.com/ui_api.jsp
    don't download the release build, it's REALLY old, download the source and compile your own jar for a much more up-to-date library.

  • Tables and structures are used in a standard scripts

    how to find which tables and structures are used in a standard scripts?
    pls explain step by step process...
    Edited by: abap on Jun 21, 2008 4:36 PM

    Go to Transaction SE80, Select Program and paste that program name below..
    Then drop down the tree of that program...then you will find option " Dict. Structures"..
    Here you can find the tables which has been you for that transaction / program.
    Regards,
    Santosh

  • Which one better to use - jsp:useBean or import statement

    Hi,
    I just want to know that which one is better to use jsp:useBean or import statement .
    I can instantiate and call method of myclass -
    1) by importing the class through import tag in jsp as <%@page import="myclass"%. or
    2). by using <jsp:useBean tag....
    i have these two option to do the same thing. i know that basically useBean is used to call setter and getter method of bean class and but it can be used to call a normal java file that have some logic .
    so what should i used , which one is better and why?
    useBean provides scope and object instance so no need to create object by new operator. and with import you have to create an instance .
    but which tag should i use in my jsp?
    i am confused???

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Which IDE is better Jdev or Eclipse for BPEL

    Hi All,
    Which Tool is better to use for BPEL - Eclipse or Jdeveloper.
    Thanking You,
    Rakesh.

    BalaTTPL wrote:
    for j2ee netbeans is best. if u use ecplise(wtp) it create only web.xml.Maybe you did something wrong :)
    compare with ecplise netbeans is best it have
    1) xml gui tool, verification and validation
    2) no need to create web.xml
    3) debug also easy and user friendly.Eclipse also offers this.
    After all, just install them both and try them both out. If you want my opinion: Eclipse Europa for Java EE or IntelliJ IDEA.

  • Which table for stock ledger

    I have th problem that, i dont know which table is present aand use for STOCK LEGDER and to have PRODICT CODE AND STOCK GROUP field

    Stock Legder can be said to be the listing of all the movements against a particular material..It can be found in table MSEG/MKPF tables. As for the final stocks you can get the information from MARD.
    For Stock Group, I am not sure of the that field but there is a field for Material type, is that one you are looking out for ?

  • Table to load dynamically using sqlloader.

    how to specify which table to load dynamically using sqlloader. We are using sqlldr in a script as given below...
    sqlldr user/pass control=/control/loader.ctl log=/log/logger.log bad=/bad/badrec.bad data=/data/d1.txt

    Hello, you'd need to build the necessary control files through a shell script, here is an example:
    # Write sqlplus commands to control_file.sql
    echo "set head off
    set feedback off
    set pagesize 0
    set termout off" > control_file.sql
    # read table and column list from table.dat
    more table.dat |awk '{print $1}' |
    while read TAB
    do
            echo "Table ${TAB}"
            read COLUMNS
            STR="nothing"
            if test "$TABLE_LIST" = "empty"
            then
                    TABLE_LIST="'$TAB'"
            else
                    TABLE_LIST="$TABLE_LIST,'$TAB'"
            fi
    # construct select to load data - creating SQL*Loader control files
            echo "set head off\n
            set feedback off\n
            set pagesize 0\n
            select column_name||' '||
            decode(data_type,'VARCHAR2',' char ('||DATA_LENGTH||')',
            'CHAR',' char ('||DATA_LENGTH||')','DATE',' date (20) \"DD-MON-YYYY HH24:MI:SS\"','')
            from user_tab_columns
            where table_name ='$TAB'
            order by 1;\n" | $ORACLE_HOME/bin/sqlplus -s $USR | awk '{print $1" "$2" "$3" "$4" "$5}' |
    # read the columns in and concatenate them together to form the control file select
            while read COLUM
            do
                    if test "$STR" = "nothing"
                    then
                            STR="\nspool $TAB.CTL\nselect 'LOAD DATA\nINFILE \"$TAB.DMP\"\nBADFILE \"$TAB.BAD\""
                            STR="$STR\nDISCARDFILE \"$TAB.DIS\"\nDISCARDMAX 99\nTRUNCATE"
                            STR="$STR\nCONTINUEIF LAST != \"$FIELD_ENCLOSURE2\"\nINTO TABLE $TAB"
                            #STR="$STR INTO TABLE $TAB"
                            STR="$STR\nFIELDS TERMINATED BY \"$FIELD_DELIMITER\""
                            STR="$STR ENCLOSED BY \"$FIELD_ENCLOSURE\" AND \"$FIELD_ENCLOSURE2\""
                            STR="$STR\n TRAILING NULLCOLS"
                            STR="$STR\n($COLUM"
                    else
                            STR="$STR,\n$COLUM"
                    fi
            done
            STR=" $STR)'\nFROM DUAL;\nspool off\n"
            echo "$STR" >> control_file.sql
    done

Maybe you are looking for

  • Problem in message Mapping SAP PI 7.1

    Hi Experts, I have a problem in my Message Mapping, Design: [Design|http://www.life-4-music.de/prob.jpg] Messagemapping: [MappingTest|http://www.life-4-music.de/probII.jpg] The Problem is, that ElementC from SourceMessage occours "0 to n" times in El

  • Error in assigning the system message

    Hi , I am trying to assign a std message no from the std message class in the table V_160M. Appl are: IW Message no :187 system is giving an error  " please specify a legal value" Msg number : CZ125 Is it possible to assign any std system message in

  • Slide order in Premiere 3.0

    I am trying to insert a set on slides into a video using Premier Elements 3.0. I have a folder containing the slides in the available media window. I use the icon view and sort them into the required order. But when I view them in the timeline, the o

  • Installing multiple instances on 11g

    the install guide says I have to run RCU and create a seperate schema for each installed instance.. I did that.. I used RCU and it created INST1_BIPLATFORM and INST2_BIPLATFORM.. I installed BI into INST1_BIPLATFORM with a path of D:\oracle\middlewar

  • Media Player doesn't show new episodes and has horrible organization.

    Yup, so i log on to adobe tv via web browser and browse the latest content and stuff with no problem. I add a program I'm currently watching(http://tv.adobe.com/watch/the-complete-picture-with-julieanne-kost/top-10-littleknown-feat ures-in-photoshop-