Why use the collections?

Please help me to better understand and to right the next point

to move from a PPT available in internet, I read a sentence under the heading "Why use collections?" Please find here

Use of complex data sets information to host non-PL/SQL environments using table functions

I think I understand: it means that complex data sets can be collected from oracle using only a single sql statement by using the installation, called Oracle Pipelined Table functions. http://www.akadia.com/services/ora_pipe_functions.html]

Is any other installation in oracle to the serveup of complex datasets of the information to the host non-PL/SQL environments?

Published by: o Manjusha Muraleedas, error corrected spelling.

I watched the presentation and here's how I read it (although you might be better to ask the author):

Manjusha Muraleedas wrote:
My question is, why the statement "Serve up complex data sets of information to host non-PL/SQL environments using table functions" came under the title "Why use collections?". Just because there's an installation? or any other really good news?

There is a hypothesis that is unwritten in the presentation: "complex" data is data that must be handled in PL/SQL, because only SQL does not work.

Nowhere the author says that a pure SQL solution should be changed into a solution of PL/SQL.

Once you decide that you must use the PL/SQL, you might want to put your data in collections in scalar variables.

I understand, complex data, works of art (suppose a structure with 3 columns of tables joing 5) can be meet non-pl/sql envirormment like Java, the use of the ref Cursor or xml. Collection using to do the same thing, this is not a good option.

Again, I think that the author uses "complex" as a shortcut for 'need to PL/SQL in the first place'. If the data must be processed in PL/SQL, there is no need to use PL/SQL scalar variables or collections.
I would say "use of the ref Cursor. Providing relational data in format XML should be the exception, not the rule. It has a cost of additional performance.

Now lets talk about pipeline table functions.
...
functions table pipeline reached the performance of parallel processing. so even if binding commodity of time and memory is there, it will be performs better than refcursors or xml?

Pipeline table functions perform no better than the ref Cursor. There are two processes running, one to SELECT and the other for the function, there will be more work on the server. With a ref cursor, there is a fair process to return the data.

Parallel processing is not a problem. If you can make it work in plain SQL, you can do in parallel in SQL simple.

Published by: Ashton stew on January 22, 2013 16:44

Tags: Database

Similar Questions

  • Why using the typewriter in acrobat 9 adds less file size that the use of the text of the comment in acrobat 11 tool?

    Why using the typewriter in acrobat 9 adds less file size that the use of the text of the comment in acrobat 11 tool?

    Two employees, one using acrobat 9 and the other uses acrobat 11. The two employees open a secure document one page 105 KB in size. Used using acrobat 9 using the typewriter tool to add comments. Document increases in volume to 137 kb. Second employee using acrobat 11 uses the comment add the text tool (since it is no longer a typewriter tool). This employee has to use tool once and the document immediately increases size of 105 k to 950 + kb. Why is this? What can be done to avoid this?

    As I suspected much earlier, the difference is in the fonts that are used for the text. For the smaller file, text annotation font is Times Roman. that is a policy that is essentially built into Acrobat/Reader. For the larger file, the font is Tahoma, which is not an integrated police force, which ends by happens so the entire police gets embedded in the PDF file. The size of this font on disk file is 681KO on my system (Mac), and it ends up taking more space when they are embedded in the PDF file. The same type of thing happens with form fields and this is done so that all characters in the font are available when the text is changed in a system that may not have the installed font.

    One of the problems is if you try to reduce the size of the file by changing the font that used up one of the built-in ones (Courier, Helvetica, TImes Roman), Acrobat does not remove the now unused of the file font information, if you do not get the reduction in file size that you can imagine, even if the font is no longer presented as being incorporated. I submitted this as a bug some time ago, but it has not been fixed.

  • How can insert quary in database by using the collection.

    Hi friends,


    My friend advice me to insert several point with collection for the use of multiple lines. But I don't know how to use the collection. How do I create the form to insert data using the collection.
    Please send me any link or example .au insert data into database by using the collection.



    My problem is:-

    I have a bill with several point for example. Grapes (25) with amount here and now I want to add these question with quantity in my database, Badam (145), banana (49), Apple (12)
    When I finally click on submit button.

    Actully I was used as a table but I am facing a problem when using tabular, tabular, I enter first item for example. Apple and there quantity for example. 12 in the textfield and after clicking on Add line enter Buttom went to the database. but I want that entry should not go the database. But only the new line should add when I click on the button Add a line.

    I want all these point 4 should enter into the database when I click on Submit Final.


    Maury

    Published by: Ed on September 6, 2009 02:22

    Hello

    I would do something like the code:

    BEGIN
     DECLARE
      vDATE DATE;
     BEGIN
      vDATE := TO_DATE(:P1_DATE1,'DD.MM.YYYY');
      WHILE vDATE <= TO_DATE(:P1_DATE2,'DD.MM.YYYY')
      LOOP
        INSERT INTO ABC (DTE, LEAVE)
        VALUES (vDATE, :P1_C);
        vDATE := vDATE + 1;
      END LOOP;
     END;
    END;
    

    You must ensure that the datepicker points both use the ' JJ. MM YYYY ' date format.

    Andy

  • Why use the symbol "!" here?

    Why use the symbol "!" here?
    If (! contactOld.getWorkAddress) .equals)
    ...
    public void entryUpdated(MapEvent event)
    {
    Contact contactOld = (Contact)event.getOldValue();
    Contact contactNew = (Contact)event.getNewValue();
    StringBuffer sb = new StringBuffer();
    if (!contactOld.getHomeAddress().equals(
    contactNew.getHomeAddress()))
    {
    sb.append("Home address ");
    }
    if (!contactOld.getWorkAddress().equals(
    contactNew.getWorkAddress()))
    {
    sb.append("Work address ");
    }
    if (!contactOld.getTelephoneNumbers().equals(
    contactNew.getTelephoneNumbers()))
    {
    sb.append("Telephone ");
    }
    
    sb.append("was updated for ").append(event.getKey());
    System.out.println(sb);
    }

    The "!" reverse value.

  • Why use the symbol {} in the following script?

    Why use the symbol * {} * in the following script?
    < reading-writing-support-map-plan >
    < scheme name > SampleDatabaseScheme < / system-name >
    < internal-cache-system >
    < local plan >
    < system-Ref > SampleMemoryScheme < / plan-ref >
    < / local plan >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.tangosol.examples.coherence.DBCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    * < {cache name} param-value > < / param-value > *.
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < / reading-writing-support-map-plan >


    Thank you very much

    Published by: jetq on June 24, 2009 18:26

    Hi Frank,.

    In the example, the '{cache-name}' is supposed to be replaced by a table name or view of data that is queried for the cached data. Its purpose is show how to pass parameters to the constructor of class.

    Kind regards

    Harv

  • Interactive report editable without using the Collection

    Hi Experts,

    I use Oracle Apex 4.2.5

    Is it possible to create an interactive report that can be changed in the same page? If the user edit a field, it must get updated in this table.

    Let me know if this is possible without assistance from the Collections of the Apex

    BR,

    Patrick

    Paul Broughton says:

    Hi Patrick,

    I also agree there is no out of the box solution, I need this for an application and I used elements of the APEX of the APEX_ITEM API

    Here is a very basic example that I have not tested, but you have a question, something like:

    [code]

    Select

    APEX_ITEM. DISPLAY_AND_SAVE (1, empno) as patient_id,

    APEX_ITEM. TEXT (2, ename) as ename

    Of

    EMP;

    [/ code]

    Make sure you use columns of standard report as your column types.

    When you click on submit you'd have a process similar to the following:

    [code]

    Start

    BECAUSE me in 1... APEX_APPLICATION. G_F01. COUNTING LOOP

    Update emp

    set ename = apex_application.g_f02 (i)

    where empno = apex_application.g_f01 (i);

    end loop;

    end;

    [/ code]

    That's assuming you don't need inline editing.  If you do this will require an even more customized solution, but the way above requires no collections.

    Thank you

    Paul

    Hi Paul,.

    I think that IR out-of-box features do not work correctly when you use the APEX_ITEM functions in the query.

    Here's another one you could use APEX 4.2

    Yet another way to create & quot; editable interactive report & quot;

    Kind regards

    Jari

  • Why used the Adobe Illustrator free trial download? How can I fix anything that's Going Wrong?

    I click on "Download trial" for Illustrator on the Adobe while website that logged into my account. He asks to open creative cloud and I click 'OK' but nothing then load it in the 'Applications' tab in the creative clouds. Nien downloads is. Creative cloud was already installed on my computer because I've used the free trial version for InDesign.

    Why is this happening? Are there not enough space on my laptop to download this app? This was very frustrating and I would appreciate any kind of help, thank you!

    I needed to update the software on my Mac

  • In a table by using the Collection update of nulls

    I use collections to create a form in a table. However, I can't get the code to work. Could you please look at my logic and let me know what I am doing wrong?
    Apex version: 4.1
    1 process name: load Collection
    a. process Point: On Load - before the header
    Condition (b) process:
    i. the condition Type: PL/SQL expression
    + ii.     Expression:
     not apex_collection.collection_exists(p_collection_name => 'STAKEHOLDERS_COL')
    +
    c. code:
    if apex_collection.collection_exists('STAKEHOLDERS_COL') = TRUE then
       apex_collection.delete_collection(
             p_collection_name =>'STAKEHOLDERS_COL');
    end if;
    apex_collection.create_collection_from_query(
        p_collection_name => 'STAKEHOLDERS_COL',
        p_query => 'select id
                   , stakeholder_name
                   , stakeholder_role_id
                   , primary_contact_yn
                   , receive_notification_yn
                   , ''O'' original_flag
                   , wwv_flow_item.md5(stakeholder_name, stakeholder_role_id, 
                     primary_contact_yn, receive_notification_yn) 
                   from eba_prjv_proj_stakeholders,
       p_generate_md5 => 'YES'
    );
    * 2.     Report on the collection:
    a. query:
    select 
    apex_item.hidden(1,c001) id,
    apex_item.popupkey_from_query(2,c002,'select user_name d, user_name r from eba_prjv_app_users order by 1', 10) name,
    apex_item.select_list_from_query(4,c003,'select role_description d, id r from eba_prjv_stkhlder_roles order by role_code', 10) role,
    apex_ITEM.SELECT_LIST(5,c004,'N','Yes;Y,No;N') primary_contact_yn,
    apex_ITEM.SELECT_LIST(6,c005,'N','Yes;Y,No;N') receive_notifications_yn,
    apex_item.hidden(7, c006) status,
    apex_item.checkbox(8, seq_id) chkbx,
    apex_item.hidden(9, seq_id) seq_id
    from apex_collections
    where collection_name = 'STAKEHOLDERS_COL'
    AND c006 IN ('O','N','U')
    * 3.     I have a button 'Add a line' add a blank line for inserts. The button "submit page" REQUEST As "ADD". *
    * 4.     The process of adding new line: *.
    a. process Point: after submit - by the calculation and Validation
    b. process of Condition: what key - add row
    c. code:
    begin
    apex_collection.add_member(
    p_collection_name => 'STAKEHOLDERS_COL',
    p_c006 => 'N',
    p_generate_md5 => 'YES' );
    end;
    * 5. I have a button Delete who submits the request page = 'DELETE '. *
    * 6.     Collection update process:
    a. process Point: after submit - by the calculation and Validation
    + b.     Condition of process:
    REQUEST != 'ADD'
    +
    c. code:
    DECLARE
    l_status VARCHAR2(1);
    l_seq_id NUMBER;
    l_original_md5 VARCHAR2(4000);
    l_array_md5 VARCHAR2(4000);
    
    BEGIN
    
    FOR i IN 1..apex_application.g_f01.count LOOP
    
    -- Check previous status of Collection Member
      
       SELECT c006, c007 INTO l_status, l_original_md5
       FROM apex_collections
       WHERE 
       collection_name = 'STAKEHOLDERS_COL'
       AND seq_id = apex_application.g_f09(i);
    
    IF l_status = 'N' THEN
       l_status := 'N';
       
    ELSE
       SELECT wwv_flow_item.md5(apex_application.g_f02(i)
       , apex_application.g_f04(i)
       , apex_application.g_f05(i)
       , apex_application.g_f06(i))
       INTO l_array_md5
       FROM DUAL;
       
       IF l_original_md5 != l_array_md5 THEN
          l_status := 'U';
       END IF;
    END IF;
    
    
    IF l_status IN ('N','U') THEN
       
       apex_collection.update_member(
       p_collection_name => 'STAKEHOLDERS_COL'
       , p_seq => apex_application.g_f09(i)
       , p_c001 => apex_application.g_f01(i)
       , p_c002 => apex_application.g_f02(i)
       , p_c003 => apex_application.g_f04(i)
       , p_c004 => apex_application.g_f05(i)
       , p_c005 => apex_application.g_f06(i)
       , p_c006 => l_status
       , p_c007 => l_original_md5
     );
    END IF;
    END LOOP;
    IF :REQUEST = 'DELETE' THEN
       FOR i IN 1..apex_application.g_f08.count LOOP
       -- Check previous status of Collection Member
     
      SELECT seq_id, c006 INTO l_seq_id, l_status
      FROM apex_collections
      WHERE collection_name = 'STAKEHOLDERS_COL'
      AND seq_id = apex_application.g_f08(i);
    
      IF l_status = 'N' THEN
         apex_collection.delete_member(
         p_collection_name => 'STAKEHOLDERS_COL'
         , p_seq => l_seq_id
        );
      ELSE
        apex_collection.update_member_attribute(
        p_collection_name => 'STAKEHOLDERS_COL'
        , p_seq => l_seq_id
        , p_attr_number => '6'
        , p_attr_value => 'D'
       );
      END IF;
     END LOOP;
    END IF;
    
    end;
    * 7.     Update the collection table
    a. process Point: present - according to calculation and Validation
    b. process of Condition: If the key (APPLY_CHANGES)
    c. code
    DECLARE
    l_table_md5 VARCHAR2(4000);
    l_collection_md5 VARCHAR2(4000);
    BEGIN
    
    FOR c1 IN (SELECT c001, c002, c003, c004, c005, c006, c007,seq_id
    FROM apex_collections
    WHERE collection_name = 'STAKEHOLDERS_COL'
    ) LOOP
    
    IF c1.c006 = 'N' THEN
       insert into eba_prjv_proj_stakeholders
                ( STAKEHOLDER_NAME,
                 STAKEHOLDER_ROLE_ID,
                 PRIMARY_CONTACT_YN,
                 RECEIVE_NOTIFICATION_YN
                 )
                values
                (c1.c002,
                 c1.c003,
                 c1.c004,
                 c1.c005            
                );
    ELSIF c1.c006 = 'D' THEN
       DELETE FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
    ELSIF c1.c006 = 'U' THEN
       -- Check the record hasn't been updated since the query
       -- Get MD5 checksum from the Table
      
     SELECT wwv_flow_item.md5(STAKEHOLDER_NAME, STAKEHOLDER_ROLE_ID, PRIMARY_CONTACT_YN, RECEIVE_NOTIFICATION_YN)
       INTO l_table_md5
       FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
       -- Compare the checksum values and if they are different, raise an error.
       IF l_table_md5 != c1.c007 THEN
          raise_application_error( -20001
          , 'Current version of data in database has changed '||
            'since user initiated update process.');
         return;
      END IF;
    
      UPDATE eba_prjv_proj_stakeholders set
      STAKEHOLDER_NAME = c1.c002,
      STAKEHOLDER_ROLE_ID = c1.c003,
      PRIMARY_CONTACT_YN = c1.c004,
      RECEIVE_NOTIFICATION_YN = c1.c005
      where id = c1.c001;
    end if;
    end loop;
    apex_collection.delete_collection( p_collection_name => 'STAKEHOLDERS_COL' );
    END;
    At the end of the process, I see null values inserted in my table. The report also displays null values.

    Published by: jaouad khalifi on August 17, 2012 04:26

    Published by: jaouad khalifi on August 17, 2012 04:42

    Published by: jaouad khalifi on August 17, 2012 04:46

    Published by: jaouad khalifi on August 18, 2012 02:03

    Hello

    I changed and then brought back to the State that you had.

    The problem here is that you have status and Seq_id returned with APEX_ITEM. HIDDEN, but you have not selected the Show check box for those columns attribute report tab.

    Thus there is no f06 and f09 only named elements in your HTML DOM and therefore no APEX_APPLICATION. G_F06 and G_F09. If your processes

    FOR correct here is what you do

    1. mark the status and Seq_id as indicated in the report attribute tab columns
    2. change the ACE status display hidden to report column Standard. Change display of the Seq_id also report Standard column

    Note that when a column is not marked to show in the report he becomes any and you don't see the associated items in the DOM HTML.

    See you soon,.

  • using the collection as an array

    Hello
    I want to use a collection as a Table.Can someone give me a code for this example.

    I'm a collection to the parameter and want to join another collection that lines with another table. I want that, because if I'm going to do the operation loop taking elements one by one and in comparison with the record in the DB table, the performance should be degraded.

    Please give the solution for the use of a collection in a table to join with another table.

    Thanks in advance
    Guljeet

    Hello

    You can find examples by doing a search on this forum or on AskTom.
    See fi.:
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:666224436920

  • Data Modeler: how to create and use the collection type

    Hello
    essentially of departure I don't understand how (for example) create and use the data based on the type of data varray type.

    Please notify.
    Thank you
    Andrew

    Hi André,.

    You can create new types of collection (varray/table) in two ways:
    (1) in the browser - find 'Types of data' > 'Types of Collection' node menu dropdown - there just 'create new collection type' it
    (2) in the types of data model diagram - you can create collection "some type structured" or collection of references to the it - use 'new Collection... '. "tool and click first on sight structured type and after the structured type that will contain the collection - new attribute is added to the latter and if there is none this type of collection already didn't set the new collection type are created and you can change it later.

    Philippe

  • Why using the driver NOR-DAQmx ANSI C functions in a thread causes a deadlock?

    Firstly, apologies if this is bad advice, but it seemed the closest fit.

    I use MSVC 2008 Express with the library in ANSI C NI DAQmx for some analog output with a box USB-6009. I create a thread to handle the signal generation is based on fixed time. My main thread running the user interface. I found that I get intermittent blockages in release, so that libraries mode NOR are responsible (in the second thread) and I use MSVCRT features (on the main thread). My test code is attached as "deadlock2.cpp".

    I used WinDbg to try to find the cause of the deadlock. Traces of the battery of my two sons are attached as t1_stack.txt and t2_stack.txt.

    It seems that the MSVCRT localtime() function uses a lock when it is called for the first time and then went to lock the Windows DLL loader lock. At the same time libraries NOR (or less libraries mxs) are responsible for locking the charger DLL is being held. The mxsutils library uses getcwd() which seems to try to block something the MSVCRT and therefore my two sons are now deadlocked.

    I can probably work around this by calling the localtime() and the NOR-DAQmx functions before I spawn my second thread so that the DLLs are already loaded in the process. However, I have no guarantee of this to continue working if something changes in the future, and if there are any locks going on finally having the DllMain() calls for a thread hanging may still cause a deadlock. If my results are correct, is it likely that NEITHER would fix the dll for not trying to make something complex in their DllMain()?

    According to NI Measurement and Automation Explorer, I'm under DAQmx libraries v9.3.5f2. I download the latest version now to try, but it will take time.

    Hi dmcminn,

    Thank you for the comprehensive and detailed bug report. I was able to reproduce the problem with NOR-DAQmx 9.6 using the code you posted. I reported it to the R & D team suitable as CAR #366538.

    I agree with your analysis of the problem. Getcwd() so the first call to __tzset() acquired _ENV_LOCK, which Microsoft has documented as the "lock for environment variables. __tzset() also called GetTimeZoneInformation(), which can load additional libraries, that you have demonstrated.

    Here are a couple more possible solutions, but they are not great:

    • Link to the static version of the CRT (/ MT instead of /MD). This would bind a separate copy of the lock of the CRT table in your program, and DAQmx would continue to use the lock to MSVCR90.dll table. They use more of the same _ENV_LOCK.
    • Build using a different version of Microsoft Visual C++ (for example 2005 or 2010). MSVCR80.dll MSVCR90.dll and MSVCR100.dll own separate copies of the lock of the CRT table.

    Whatever it is, it does not eliminate the fact that mxsutils called the CRT while now the loader lock, and this function CRT acquires another lock.

    Furthermore, the forum Multifunction DAQ is a better place to ask questions DAQmx.

    Brad

  • Why used the work of my Movie Clip 3D rotation tool?

    Im trying to use the tool rotation 3d for the first time. I have a picture, set as a (movieclip) symbol on its own layer. However, when I select the 3D rotation tool, it me does not change the clip. It shows me just the empty arrow.
    Could someone please shed some light on this? The only information I can find about this tool doesn't work does not correctly is if you try to manipulate an object that is NOT a clip.

    Thank you!

    Hi Sarah,.

    The screenshot shows that you have selected the 3D translation tool. Just press W to activate the 3D rotation tool (or click and hold on the Group of 3D for the suboptions tools and select the rotation tool). You should be able to use the 3D on this clip rotation after that. Let us know if there are any other questions.

    Kind regards

    Dharmendra.

  • Why used the images on my office show a thumbnail preview?

    I use Windows XP 2002 and I tried to go into folder options, but there is nothing on the activation of thumbnail previews. I also went to the Windows Live Photo Gallery, but I don't see anything there either.

    Hello

    Go to the folder where you have the photos you want. Right-click and select Properties.
    Click the Customize tab. Under folder pictures, click on restore by default. You should now be able to see the thumbnails on the record.

    You can download Microsoft TweakUI from the following location to display thumbnails.
    http://Windows.Microsoft.com/en-us/Windows/downloads/Windows-XP

  • When I do exp (expdp), why use the temporary tablespace?

    Dear

    Imp (impdp) is using temporary tablespace.

    but I'm not using tablespace temp, while exp (expdp) is running.

    I think that exp (expdp) will not use temporary tablespace. is it not?

    Please let me know?

    He could.  It must run queries on the data dictionary.  Some of these applications may require the temp tablespace.

    Hemant K Collette

  • Add line as a manual by using the collection: failed to add several lines

    Hello

    I have some problem by adding lines manual tabular form.

    Whenever I click on the button 'Add Row', the previous entries are updated.

    Help, please:

    Here are the details in apex.oracle.com

    https://Apex.Oracle.com/pls/Apex/f?p=39422:2

    Schema: mikeT

    user: bisitako / 20bisitako14.

    Hello

    Problem is that just the PL/SQL code of the dynamic action race will not fill APEX_APPLICATION. G_Fxx berries.

    I copy your app ID 56444.

    Here you can see example how to fill the tables and send the values for the application process by using dynamic action.

    Kind regards

    Jari

Maybe you are looking for