Insert/select one million rows at a time from source to target table

Hi,
Oracle 10.2.0.4.0
I am trying to insert around 10 million rows into table target from source as follows:
INSERT /*+ APPEND NOLOGGING */ INTO target
SELECT *
FROM source f
WHERE
        NOT EXISTS(SELECT 1 from target m WHERE f.col1 = m.col2 and f.col2 = m.col2);There is a unique index on target table on col1,col2
I was having issues with undo and now I am getting the follwing error with temp space
ORA-01652: unable to extend temp segment by 64 in tablespace TEMPI believce it would be easier if I did bulk insert one million rows at a time and commit.
I appriciate any advice on this please.
Thanks,
Ashok

902986 wrote:
NOT EXISTS(SELECT 1 from target m WHERE f.col1 = m.col2 and f.col2 = m.col2);
I don't know if it has any bearing on the case, but is that WHERE clause on purpose or a typo? Should it be:
        NOT EXISTS(SELECT 1 from target m WHERE f.col1 = m.COL1 and f.col2 = m.col2);Anyway - how much of your data already exists in target compared to source?
Do you have 10 million in source and very few in target, so most of source will be inserted into target?
Or do you have 9 million already in target, so most of source will be filtered away and only few records inserted?
And what is the explain plan for your statement?
INSERT /*+ APPEND NOLOGGING */ INTO target
SELECT *
FROM source f
WHERE
        NOT EXISTS(SELECT 1 from target m WHERE f.col1 = m.col2 and f.col2 = m.col2);As your error has to do with TEMP, your statement might possibly try to do a lot of work in temp to materialize the resultset or parts of it to maybe use in a hash join before inserting.
So perhaps you can work towards an explain plan that allows the database to do the inserts "along the way" rather than calculate the whole thing in temp first.
That probably will go much slower (for example using nested loops for each row to check the exists), but that's a tradeoff - if you can't have sufficient TEMP then you may have to optimize for less usage of that resource at the expense of another resource ;-)
Alternatively ask your DBA to allocate more room in TEMP tablespace. Or have the DBA check if there are other sessions using a lot of TEMP in which case maybe you just have to make sure your session is the only one using lots of TEMP at the time you execute.

Similar Messages

  • How to insert a set of rows at a time from another table

    Hello!
    I have a table1 and table 2 - i want to insert a set of rows at a time from table1 to table 2. Then do a COMMIT. Then continue inserting another set of rows and so on.... say i want to insert into table 2 i million records at a time and then do a commit. then continue with the next 1 million and do a commit and so on..until there are no more records in table 1
    Any ideas please!!!!!!!!!!

    may be this will help
    declare
    cursor c1
    select * from table1
    i_counter binary_integer := 1;
    begin
    for c1_rec in c1
    insert into table2
    values(c1_rec.,..);
    if i_counter = 1000? then
    commit;
    i_counter = 1;
    end if;
    i_counter := i_counter+1;
    end loop
    end;

  • Restrict number of rows to be pulled from PeopleSoft's PS_LEDGER table while importing data in FDMEE

    Hi,
    We need to know if FDMEE 11.1.2.3.520 product supports restricting number of rows to be pulled from PeopleSoft's PS_LEDGER table.
    All the records fetched from PS_LEDGER is getting loaded into TDATASEG table.
    Currently, it is trying to pull all the records based on the given "period", "version" and "year" combination. We are looking to restrict rows based on specific account/entity/program/subprogram combination.
    If this is can be done, will it be an out-of-the-box functionality or does it require any customization/import scripts/api.
    Admin guide does say we can use Jython to filter rows using import scripts. However, it seems to be limited to file not a table as a source.
    I have attached a document with the screenshots so that the issue is better understood !
    Thanks,
    Hari

    1)
    When you set a column to hidden in a classic report using the method I described, it creates hidden form elements for that column.
    <tt><input type="hidden" name="f01" value="" id="f01_0002"></tt>
    You should inspect the source to figure out the name value.
    Since this belongs to the wwv_flow form, we can therefore get this data with: wwv_flow.f01
    Alternatively, you could have used the apex_item API to achieve the same result, which probably gives a bit better control.
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CHDBFHGA
    select apex_item.hidden(1, col) || col col
    from table
    Set that column to a standard report column so it doesn't escape the html.
    You can also reference the data in these fields using PL/SQL using the apex_application API:
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_app.htm#CHDGJBAB
    2)
    As above, setting the column to hidden creates hidden elements on the page. It is simply f01 because that is the only hidden field I would have on my page. With four reports on the page, you would need to be careful not to do the same on the other reports, as you would get inaccurate data. For each report, setting columns to hidden always starts with f01. In that, you would be best to use the apex_item API.
    I actually initially ran into this issue when i had a tabular form on the same page as a report with hidden fields, which was causing conflicts in the page processes.
    Hope it helps.

  • Select one radio button at a time

    Hi all,
    my webdynpro table contains 3 rows. each row contains one radio button. at a time i should select only one radio button and bydefault the first one should be select.
    Thanks,
    Sagarika

    Hi,
    when the view will load,  bydefault radio button of first row of webdynrpo table should check. in this part i am facing problem.
    in my onaction-method i wrote the down code for 'deselect radio button if i will select other one'.my node is 'paticipants'.
      " Uncheck  other Radio button if selected
      DATA: lo_nd_participants  TYPE REF TO if_wd_context_node,
            lo_changed_elem     TYPE REF TO if_wd_context_element,
            lo_elem             TYPE REF TO if_wd_context_element,
            lt_elem_set         TYPE wdr_context_element_set,
            ls_chgd_participant TYPE LINE OF wd_this->elements_participants,
            ls_participant      TYPE LINE OF wd_this->elements_participants.
      FIELD-SYMBOLS:
            <fs_participant>   TYPE LINE OF wd_this->elements_participants.
      " Get the changed context row
      CALL METHOD wdevent->get_context_element
        EXPORTING
          name  = 'CONTEXT_ELEMENT'
        RECEIVING
          value = lo_changed_elem.
      " Get static attributes
      CALL METHOD lo_changed_elem->get_static_attributes
        IMPORTING
          static_attributes = ls_chgd_participant.
      " Navigate from <CONTEXT> to <PARTICIPANTS> via lead selection
      lo_nd_participants = wd_context->get_child_node( name = wd_this->wdctx_participants ).
      IF lo_nd_participants IS INITIAL.
        RETURN.
      ENDIF.
      " Get all the selected elements from the context
      lt_elem_set = lo_nd_participants->get_elements( ).
      " Process the elements
      LOOP AT lt_elem_set INTO lo_elem.
        CALL METHOD lo_elem->get_static_attributes
          IMPORTING
            static_attributes = ls_participant.
        IF ls_participant-prim_userid NE ls_chgd_participant-prim_userid.
          ls_participant-admin_ind = abap_false.
          lo_elem->set_static_attributes( ls_participant ).
            ENDIF.
      ENDLOOP.

  • Unable to insert more than 9 rows at a time

    Hi there,
    I have to insert more than 5000 rows in my table at a time,but i am not able to insert more than 10 ROWS AT ATIME.
    Do we need to do some that at the data base level for this to happen??????
    Thanks in Advance.

    Rather than give us unhelpful comments like "still its not taking", why don't you show us exactly what you're doing? We can't help you if you don't give us enough information.
    I've tried it and it works fine:
    SQL> create table customer (dealership_id number,
      2  region varchar2(100),
      3  customer_no number,
      4  firstname varchar2(100),
      5  lastname varchar2(100),
      6  address varchar2(100),
      7  city varchar2(100),
      8  state varchar2(100),
      9  zip varchar2(100),
    10  country varchar2(100),
    11  phone_number varchar2(100),
    12  email varchar2(100),
    13  gender varchar2(1),
    14  age number,
    15  transaction_date date);
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
      3  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
      4  TRANSACTION_DATE ) VALUES (
      5  1, 'West', 546, 'Maria L', 'Umali', '515 W 59th St', 'San Francisco', 'California'
      6  , 10019, 'United Sta', '2122478223', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
      7  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
      8  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
      9  TRANSACTION_DATE ) VALUES (
    10  24, 'East', 547, 'Justa', 'Viafara', '66 Avenue C', 'Charleston', 'West Virginia'
    11  , 10009, 'United Sta', '2126736156', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    12  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    13  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    14  TRANSACTION_DATE ) VALUES (
    15  22, 'East', 548, 'C', 'Vignola', '41 Carmine St', 'Miami', 'Florida', 10014, 'United Sta'
    16  , '2122436687', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    17  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    18  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    19  TRANSACTION_DATE ) VALUES (
    20  2, 'West', 549, 'Catherine', 'Vignola', '16 Barrow St', 'San Diego', 'California'
    21  , 10014, 'United Sta', '2129297697', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    22  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    23  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    24  TRANSACTION_DATE ) VALUES (
    25  10, 'West', 550, 'Ashley', 'Weare', '275 W 96th St', 'Oakland', 'California', 10025
    26  , 'United Sta', '2128652935', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    27  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    28  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    29  TRANSACTION_DATE ) VALUES (
    30  9, 'West', 551, 'Shamire A', 'Zobadi', '446 W 46th St', 'San Jose', 'California', 10036
    31  , 'United Sta', '2129740994', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    32  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    33  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    34  TRANSACTION_DATE ) VALUES (
    35  20, 'East', 552, 'Iride', 'Ciaccio', '130 Wisner Ave', 'Baltimore', 'Maryland', 12550
    36  , 'United Sta', '9145612058', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    37  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    38  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    39  TRANSACTION_DATE ) VALUES (
    40  17, 'Central', 553, 'Cecil', 'Jackson', '30 Lake Dr', 'Houston', 'Texas', 12550, 'United Sta'
    41  , '9145617354', '[email protected]', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    42  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    43  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    44  TRANSACTION_DATE ) VALUES (
    45  4, 'West', 554, 'M P', 'Prabhu', '590 River Rd', 'Scottsdale', 'Arizona', 12550, 'United Sta'
    46  , '9145656155', 'null', 'F', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    47  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    48  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    49  TRANSACTION_DATE ) VALUES (
    50  16, 'Central', 555, 'Jacob', 'Agam', '221 E 61st St', 'Ann Arbour', 'Michigan', 10021
    51  , 'United Sta', '2127524408', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    52  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    53  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    54  TRANSACTION_DATE ) VALUES (
    55  23, 'East', 556, 'Alkis', 'Agaphogleous', '208 W 15th St', 'Fairfax', 'Virginia', 10011
    56  , 'United Sta', '2126478725', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    57  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    58  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    59  TRANSACTION_DATE ) VALUES (
    60  19, 'East', 557, 'Ponti C', 'Cia', '251 Central Park W', 'New York', 'New York', 10024
    61  , 'United Sta', '2128777400', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    62  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    63  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    64  TRANSACTION_DATE ) VALUES (
    65  27, 'West', 558, 'Steve', 'Ciabbatoni', '71 Broadway', 'Phoenix', 'Arizona', 10006
    66  , 'United Sta', '2128639140', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    67  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    68  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    69  TRANSACTION_DATE ) VALUES (
    70  13, 'Central', 559, 'Pascale', 'Coadou', '307 E 89th St', 'Austin', 'Texas', 10028
    71  , 'United Sta', '2128769343', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    72  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    73  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    74  TRANSACTION_DATE ) VALUES (
    75  21, 'East', 560, 'Arthur G', 'Coake', '95 W 95th St', 'Boston', 'Massachusetts', 10025
    76  , 'United Sta', '2122221851', '[email protected]', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    77  INSERT INTO CUSTOMER ( DEALERSHIP_ID, REGION, CUSTOMER_NO, FIRSTNAME, LASTNAME, ADDRESS, CITY,
    78  STATE, ZIP, COUNTRY, PHONE_NUMBER, EMAIL, GENDER, AGE,
    79  TRANSACTION_DATE ) VALUES (
    80  15, 'Central', 561, 'B P', 'Coakley', '139 W 35th St', 'Minneapolis', 'Minnesota'
    81  , 10001, 'United Sta', '2126863187', 'null', 'M', 39, TO_Date( '01/10/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    82* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from customer;
      COUNT(*)
            16

  • How to send data one row at a time from xml to flex

    I want to setTimerEvent while sending data from xml to flex, one row at a time.
    I have attached the xml.
    Thanks in advance.

    Hi Greg,
    Thanks for the reply. You must have seen the xml which i have attached.Here is the .mxml code which i have written:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="accountData.send()">
    <mx:Script>
    <![CDATA[
    import mx.controls.*;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var AccountInformation:ArrayCollection;
    private function AccountHandler(evt:ResultEvent):void
        AccountInformation = evt.result.xml.AccInfo;
    private function faultHandler(evt:FaultEvent):void
        var faultMessage:String = "Could not connect with XML file";
        Alert.show(faultMessage, "Error opening file");
    ]]>
    </mx:Script>
    <mx:HTTPService id="accountData" url="pgm1.xml" result="AccountHandler(event)" fault="faultHandler(event)"  />
    <mx:DataGrid x="20" y="24" width="950" dataProvider="{AccountInformation}" />
    </mx:Application>
    This reads and displays all the rows. But I want to display single row at a time with sometime time gap between the display of two consecutive rows.I am new to flex and this is my first code, so need your help on this.
    I hope i have made myself clear. If there is anything else please let me know.
    Looking forward to some solution.
    Thanks in advance.
    Regards,
    praj58

  • How to select One Check Box at a time

    Dear All
    I have 10 records in details blok and also I have 10 check boxes .
    I want user can only check one check box at a time .
    For example If first record I have checked and i am trying to check the last record then the first record UNCHECKED and the last record will checked .
    Like how redio buttons work ..
    How can i do that ..?
    I have done like this :-
    1st I have declare a global variable in PRE_FORM :GLOBAL.CNT := 'N';
    Then
    WHEN-CHECKBOX-CHANGED trigger
    IF CHECKBOX_CHECKED(EMP.CHK') THEN
        IF :GLOBAL.CNT != N THEN
            :EMP.CHK := Null
       HERE what to write ???
            RAISE FORM_TRIGGER_FAILURE;
        ELSE
            :GLOBAL.CNT := Y;
        END IF;
    ELSE
        :GLOBAL.CNT := N;
    END IF;Edited by: LuKKa on Aug 29, 2012 1:12 PM
    Edited by: LuKKa on Aug 29, 2012 1:13 PM

    LuKKa,
    An easier method would be to use a Calculated Field to summarize the value of your CHECKBOX Item. For example, add a non-table item (call it SUM_CHECKED) to your detail block and do not assign it to canvas - so it will not be displayed. Then set the following properties of the SIM_CHECKED item:
    Database Item = No
    Calculation Mode = Summary
    Summary Function = Sum
    Summarized Block = <YOUR DETAIL BLOCK>
    Summarized Item = <YOUR CHECKBOX ITEM>
    Next, you will need to change your Detail Block property Query All Records to YES (this is required for the Calulated Item).
    Now, make sure your checkbox is data type NUMBER and has the following minimum properties set:
    Data Type = Number
    Maximum Length = 1
    Initial Value = 0
    Value when Checked = 1
    Value when Unchecked = 0
    Check Box Mapping of Other Values = Not Allowed or Unchecked
    Now, in your Checkbox Item's When-Checkbox-Changed trigger add code similar to this:
    IF ( CHECKBOX_CHECKED('YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM') ) THEN
       IF ( :YOUR_DETAIL_BLOCK.SUM_CHECKED > 1 ) THEN
       --Reset the checkbox
       :YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM := NULL;
       MESSAGE('You can only check one item.');
       Message(' ');
       RAISE Form_Trigger_Failure;
       END IF;
    END IF;I have confirmed this method works and it is more efficient than looping through your records to see if other checkboxes are checked.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • URGENT: Selecting only 25 records at a time from a table

    URGENT !!!!
    Hi,
    Im having a RFC which selects records from a table (say table_A) and depending on these selected records, further processing is done within that RFC.
    Now my problem is, this table_A contains around 200 matching records. Due to this entire logical processing consumes lot of time. Hence my RFC is taking huge time to produce result. (apprx 10 mins).
    Can i select these matching records in batch of 25 and display result for these 25 records??
    I'll give this batch size as input to RFC?
    Do anybody have any idea about how to tackle this situation and reduce response time?
    If u hav any better solution than this then pls pls let me know ASAP..
    Regards,
    Amey

    Amey Mogare  ,
                             Do One thing , create  a new importing parameter in your RFC , say current_trans_id. NOw on the first call pass the initial value for current_trans_id.
    then inside the logic .. change the select to
    select upto 25 rows where trnascation id > current_trans_id.
    next time when u call teh rfc.. send the last selected id as a value for current_trans_id.
    i think you can some how use this logic
    Regards
    Sarath

  • Generating 20 million rows induced error: ORA-01653: unable to extend table

    Exact error is: ORA-01653: unable to extend table HR.F by 1024 in tablespace SYSTEM.
    Why cannot it extend table HR.F?
    Is it because I have Oracle Express Edition 10g?
    "Typically you will receive one of the following messages during the upgrade if your SYSTEM tablespace size is insufficient". What should I consider when wanting to generate 20 million rows? By the way, generating 1 million rows is successful.

    1.By esuring the status of the tables FND_INSTALL_PROCESS and AD_DEFERRED_JOBS and if there are any rows in it, also checking the worker logs (If it exisits) and patch log, we can consider options which we can make sure that the current issue can be taken care. If the adpatch has come out and back to prompt, after adding the space we can restart with the various options to start from where it left off.If FND_INSTALL_PROCESS and AD_DEFERRED_JOBS have not been dropped by adpatch, you can start adaptch from the beginning (after fixing the failed worker via adctrl as stated by Rajiv), and continue with the previous failed adpatch session.
    2. By adding up the space we can also ensure that the future patch application will not fail again.Correct -- Provided you have sufficient space or turning autoextend on for this tablespace (with cautious).
    Thanks,
    Hussein

  • Calculations in query taking long time and to load target table

    Hi,
    I am pulling approx 45 Million records using the below query in a ssis package which pulls from one DB on one server and loading the results to another target table on the another server. In the select query I have a calculation for 6 columns. The target
    table is trunctaed and loaded every day. Also most of the columns in the source which I used for the calculations is having 0 and it took approximately 1 hour 45 min to load the target table. Is there any way to reduce the load time? Also can I do the calcultions
    after once all the 47 M records loaded during query running and then calculate for the non zero records alone?
    SELECT T1.Col1,
    T1.Col2,
    T1.Col3,
    T2.Col1,
    T2.Col2,
    T3.Col1,
    convert( numeric(8,5), (convert( numeric,T3.COl2) / 1000000)) AS Colu2,
    convert( numeric(8,5), (convert( numeric,T3.COl3) / 1000000)) AS Colu3,
    convert( numeric(8,5), (convert( numeric,T3.COl4) / 1000000)) AS Colu4,
    convert( numeric(8,5),(convert( numeric, T3.COl5) / 1000000)) AS Colu5,
    convert( numeric(8,5), (convert( numeric,T3.COl6) / 1000000)) AS Colu6,
    convert( numeric(8,5), (convert( numeric,T3.COl7) / 1000000)) AS Colu7,
    FROM Tab1 T1 
    JOIN Tab2 T2
    ON (T1.Col1 = T2.Col1)
    JOIN Tab3 T3
    ON (Tab3.Col9 =Tab3.Col9)
    Anand

    So 45 or 47? Nevertheless ...
    This is hardly a heavy calculation, the savings will be dismal. Also anything numeric is very easy on CPU in general.
    But
    convert( numeric(8,5), (convert( numeric,T3.COl7) / 1000000))
    is not optimal.
    CONVERT( NUMERIC(8,5),300 / 1000000.00000 )
    Is
    Now it boils to how to make load faster: do it in parallel. Find how many sockets the machine have and split the table into as many chunks. Also profile to find out where it spends most of the time. I saw sometimes the network is not letting me thru so you
    may want to play with buffers, and packet sizes, for example if OLEDB used increase the packet size two times see if works faster, then x2 more and so forth.
    To help you further you need to tell more e.g. what is this source, destination, how you configured the load.
    Please understand that there is no Silver Bullet anywhere, or a blanket solution, and you need to tell me your desired load time. E.g. if you tell me it needs to load in 5 min I will give your ask a pass.
    Arthur
    MyBlog
    Twitter

  • Adding more then one horizontal row at a time

    How do I add multiple horizontal rows in Numbers?

    Hi Whixen,
    OK, different question, but still not quite clear.
    Do you want individual sums for each row, one sum for all of the cells in a block, or both of these? Here's a sample of each:
    The formulas in E2 and E5 are shown in column F. Both were created using the steps below.:
    E2:
    Enter =sum(
    Click on B2 and drag to include C2 and D2 in the selection.
    Release the mouse button, then press return or click the green Accept button on the function editor.
    Numbers will supply the capitalization and the closing parenthesis.
    E5:
    Enter =sum(
    Click on B2 and drag to D4 to add all intervening cells to the selection.
    Release the mouse button, then press return or click the green Accept button on the function editor.
    Numbers will supply the capitalization and the closing parenthesis.
    The formulas in E3 and E4 are copies of the one in E2. They were added by filling the formula in E2 down to E4:
    Select E2.
    Place the mouse pointer on the Fill Control handle,
    When the mouse pointer changed to a black + sign, click and drag the Fill handle down to include E3 and E4 in the selection rectangle.
    The Fill Handle is the small circle at the bottom right corner of the selection. You can see an example in E5 in the image above.
    Regards,
    Barry

  • How to play one specific album at a time from the Artist tab.

    In regards to 5th gen iPod Touches: I'm wondering if I can play just one album at a time (not all the songs by an artist) via the Artist tab. The only way I have found to do this is Artist>Click on a song in the album I want to listen to (At this point, ALL songs from the artist will be selected for playing)>Click on the album's song listing on the top right>click on another song in the album. This is very inconvenient and was not at all like this on my older iPod Touch. Any help would be great!

    Is the MQ Queue local or remote?

  • How to Get One MQ Message at a time from MQ Queue

    Hi,
    Before posting my query here is the configuration I am using:_
    Weblogic Server 10.3.3
    Soa Server 11.1.1.3.0
    Oracle JDeveloper 11.1.1.3.0
    Till now I have done the following things:_
    1) created an MQ Queue
    2) Producing MQ Messages in the Queue with the help of an Asynchronous BPEL process.
    I can see the message put in the Queue:
    What is my requirement?_
    1) I want to read (Get) only one of the above created MQ Messages in the main BPEL process(Synchronous), then needs to process it
    And based on my Business condition I have to write that message in the Database.
    After successful completion of this instance only my main process should go to consume the next message in the MQ queue.
    What is the problem I am facing?_
    1) The main BPEL process is not reading one message at a time. I.e. if there are 10 messages in the queue, then as soon as the main bpel process gets deployed, 10 instances created automatically, all in running status and Queue gets empty
    2) And if I explicitly test the process, the processes always go in running mode. I.e. Waiting for the messages at the receive activity (this receive is attached to the MQ adapter through operation Get in the main BPEl process)
    I just want to know how I can read the MQ messages one by one, though there may be n number of messages in the MQ queue
    And only after the completion of the first instance (of Reading First MQ message from queue) it would go to initiate the next instance and so on
    Would anyone please help me in this issue?
    Thanks
    Sunil

    Is the MQ Queue local or remote?

  • Refresh select one choice executing an action binding from ViewObjectImpl

    Hello,
    I'm using Oracle JDeveloper 11g Release 2 (11.1.2.3.0).
    I have a jspx page with a panel tabbed with 2 tabs. In the first one, I have a SelectOneChoice and a button. This command button executes a method in a ViewObjectImpl to add items on a table.
    Here the code of the button:
    <af:commandButton actionListener="#{bindings.addCarToStock.execute}"
                                                          text="Add to Stock"
                                                          disabled="#{!bindings.addCarToStock.enabled}" id="cb2"/>
    On the other tab, I have a form with another SelectOneChoice, in this SOC, you have to choice an item added in the other tab. But when I add a new item in the first tab, the new item does not appear in the SOC of the second tab.
    This would be solved if I execute an action binding on the VOIterator of the second tab, but I can do it from the method on the ViewObjectImpl.
    Can someone help me?
    Thanks in advance!

    Hi Timo,
    I've done what you tell me and still don't work.
    In tab2, I have a form with some attributtes of a VO. One of them it's a SOC (the one that I want to refresh), that takes the values from a LOV. I try to execute the method of the iterator of the LOV first, and after execute the method of the iterator of the VO, but nothing works.
    Here the code in the bean:
    public void addCarToStockActionListener (ActionEvent actionEvent){
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding method = bindings.getOperationBinding("addCarToStock");
            if (method == null) {
                System.out.println("Method Not Found");
            method.execute();
            List errors = method.getErrors();
            if (!errors.isEmpty()) {
                System.out.println("Error");
            OperationBinding executeCarSalesLOVIteratorMethod = bindings.getOperationBinding("ExecuteCarSalesLOVIterator");
            if (executeCarSalesLOVIteratorMethod == null) {
                System.out.println("Method Not Found");
            executeCarSalesLOVIteratorMethod.execute();
            List errors2 = executeCarSalesLOVIteratorMethod.getErrors();
            if (!errors2.isEmpty()) {
                System.out.println("Error");
            OperationBinding executeSalesVOIteratorMethod = bindings.getOperationBinding("ExecuteSalesVOIterator");
            if (executeSalesVOIteratorMethod == null) {
                System.out.println("Method Not Found");
            executeSalesVOIteratorMethod.execute();
            List errors3 = executeSalesVOIteratorMethod.getErrors();
            if (!errors3.isEmpty()) {
                System.out.println("Error");
    And here the code of the form in tab2 (with the SOC I want to update):
    <af:panelFormLayout id="pfl1">
         <af:selectOneChoice value="#{bindings.SaleCarId.inputValue}"
              label="Model"
              required="#{bindings.SaleCarId.hints.mandatory}"
              shortDesc="#{bindings.SaleCarId.hints.tooltip}" id="soc3"
              partialTriggers="cb12">
         <f:selectItems value="#{bindings.SaleCarId.items}" id="si3"/>
         </af:selectOneChoice>
         <af:toolbar id="t5">
              <af:commandButton actionListener="#{bindings.CreateInsert1.execute}"
                   text="New Sale"
                   disabled="#{!bindings.CreateInsert1.enabled}" id="cb3"/>
              <af:commandButton text="Save New Sale" id="cb6"
                   actionListener="#{salesBean.commitActionListener}"/>
         </af:toolbar>
    </af:panelFormLayout>

  • Selecting only one row at a time

    Hi experts,
    i have following doubt regarding selecting rows from a db:
    Is there any way of selecting only one row AT A TIME from a dabase just to collect the data in rows instead of in a unique document containing all the rows?
    I would like you to ellaborate on this as i need to send only one row to the IE, and then other row, and so on... without throwing any error!
    I have seen that there are SELECT SINGLE and SELECT UP TO 1 ROW, but these two methods are only useful when retrieving only one row, and that does not match my requirements. I need to process all the rows but one by one..
    I know that we can use the receiver jdbc adapter as if it was a sender by means of its specific datatype, but how to do it row by row??
    Hope i had explained well..
    Thanks in advance and best regards,
    David

    Hi kiran,
    Yes, my table has 5 not null fields but i am selecting and updating fixes values so i think that I will definetely go for the next solution:
    SELECT * FROM t1 WHERE status='0' and ROWNUM<2;
    UPDATE t1 SET status='1' WHERE status='0' and ROWNUM<2;
    My only concern is if the update will take the same row that the select.... BTW, I think it will
    ..What do you guys think?
    I ve been trying to operate with your proposed queries but i received some errors. Your queries are very interesting but i think that with the above ones i meet my requirements as the status field will be 0 for not processed rows and 1 for precessed ones (and the update will look for the row that meets the same 'where' clause than the select, and then, and only then, it will set status='1').
    The only thing i have to care about is what i questioned before.
    Thanks a lot and best regards,
    David

Maybe you are looking for

  • Adobe Reader XI won't launch/read pdfs. No error message.

    All of a sudden, reader xi wont launch, read pdfs, or download pdfs online. When I double click the program shortcut (or pdf I want to open) the mouse makes the "loading" animation....but nothing happens. No error message, just refuses to work. Re-in

  • Turning Tables in ABAP for ALV Display

    Dear all, I am running in a (for me) tricky problem: I read any table definitions from the dictionary with function "DDIF_TABL_GET". In the next step I want to build a ALV Grid that displays some of the read data but not in rows but in lines. Ok how

  • Oracle 10.2.0.4 RMAN Duplicate without a Recovery Catalog

    Production Backups are Tuesday - Sunday at 22:00: RUN { ALLOCATE CHANNEL c1 DEVICE TYPE DISK; CROSSCHECK ARCHIVELOG ALL; CROSSCHECK BACKUP; DELETE NOPROMPT COPY OF ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-2'; DELETE NOPROMPT BACKUP; BACKUP DATABASE P

  • JAPAN Specific sub-contract process:

    Dear Friends, Please help to know: u2018JAPAN Specific sub-contract processu2019 details. Please help to send if any related information. Thanks in advance. RAMAN.

  • Questions about migrating Configurator 4 PS panel to Extension Builder 3.

    Hello, I am in the process of creating a set of Photoshop tools that I'm hoping to release on Adobe Exchange in the very near future. The tools are a set of javascript files that are executed through a simple panel interface consisting of 4 buttons.