Add the new column on 25 million lines Table

Hi gurus,

I have to add the new column to a populated application table who get to each Transaction.
We can do this with no interruption of service and what are the things that I need to look after adding the peak of performance.
Something happened to my mind is re - run stats

Any Suggestion

Database version = 10.2.0.4
OS = RHEL4

I appreciate your help on this
Thank you

789816 wrote:
If the GET of the table is locked, it means that the application cannot write any new transactions in the table until the new default values has been updated?, my understanding of the downtime to do this to

*-Online Yes, you need downtime in 10 g *.

Another Question if we have default values as NULL will always be the table get locked?

*-ONLINE YES *.

11 g, this problem has been fixed by oracle: http://www.oracle-class.com/?p=1943

create table sales as
   select rownum as id,
   mod(rownum,5) as product_id,
 mod(rownum,100) as client_id,
 2000 as price,
 to_date(
 '01.'||lpad(to_char(mod(rownum,3)+1),2,'0')||'.2011','dd.mm.yyyy')
 as c_date
 from dual
 10   connect by level <= 2.5e5;

Table created.

SQL> select count(*) from sales;

  COUNT(*)
----------
    250000

----session 1
SQL> begin
  2  for i in 1..100000 loop
  3  insert into sales (id) values(i);
  4  end loop;
  5  commit;
  6  end;
  7  /

PL/SQL procedure successfully completed.

SQL> 

When inserting into the table sales, the alter table add the new column was waiting for the inserts to finish

-----session2:
SQL> alter table sales add (provider_id NUMBER(2));

Table altered.

SQL> 

Tags: Database

Similar Questions

  • How to add the new column in existing table to our desired location?

    How to add the new column in existing table to our desired location?

    For example, I have to add the new column 'course' before the salary column in the emp table.

    I think the best way is to add the column at the end of the table and create a new view with the order of the columns...

    Another option...

    places the data into a temporary table and recreate the table with the correct order of the columns, and then insert data to the table from the temporary table

    Refer

    Add column (from table) in the desired position

    Example:

    CREATE TABLE temp_my_user LIKE)

    SELECT * FROM password);

    DROP TABLE password;

    (Password) CREATE TABLE

    userID NUMBER

    , first name VARCAHR2 (25)

    , middleInitial VARCHAR2 (1)

    (, name VARCHAR2 (25));

    INSERT INTO password (userID, firstName, lastName)

    (SELECT username

    first name

    lastName

    OF temp_my_user);

    DROP TABLE temp_user;

  • How to add the new column in the tabular layout editor in Oracle Forms

    Hello

    I need to add the new column to a datablock and display the newly added column in the form. What are the steps I need to follow.

    1. I chose the new column from the view to the datablock.
    2. Add the text element in the layout editor. But this position is not correct. It overlaps with another column. How to add the new column to the layout editor?

    Thank you
    HC

    In the layout editor, you can simply drag the fields so that they do not overlap.
    See http://www.youtube.com/watch?v=7emNa7THMLg

    Sandeep Gandhi

  • Effect with application ADF Go-live when I add the new column to the database.

    Hi all

    My already deployed ADF application and entry into service.
    I would add three columns of data.
    I worried that if I have does not add the new column and will redeploy again, it will have an effect at my request.

    Anyone here ever face with a kind of this problem

    Kind regards
    Zenoni

    Hello

    As the General best practices. You do not direct operations on the ACTIVE database rather test the application in the test environment.

    on the other hand if your column is NOT NULL then it will affect your application otherwise no impact

  • How to add the new column to a specific position

    Hello

    My table looks like Fallows.

    Select * from company

    PRODUCT_ID COMPANY_ID COMPANY_SHORT_NAME COMPANY_LONG_NAME
    11001An Inc.Long name A Inc.
    11002B Inc.Long name B Inc.
    11003C Inc.Long name C Inc.
    21004D Inc.Long name D Inc.
    21005E Inc.Long name E Inc.
    21006F Inc.Long name F Inc.

    My requirement is I would LIKE to add A NEW COLUMN AS COMPANY_LOCATION NEXT TO COMPANY_SHORT_NAME

    How to get there.


    I tried like Fallows alter company table add company_location varchar2 (100) after company_short_name;

    but this query shows the error

    ORA-01735: invalid option of ALTER TABLE

    If the query I've tried is correct?

    Give me your suggestions.

    Thanks in advance.

    As long as you're on 11 GR 2 or lower, it will not work.

    There is no Clause "AFTER"in the alter table do not add column."

    You have the chance to use dbms_redefinition (when no interruption of service is possible) or manually create a new table with the columns in the order you need and then migrate the data and then drop the original and rename a new.

    In case you are already on 12 c, you have a chance to add the column to the end and then make visible columns and invisible status in the right order. This way your column will get to the position that you want it to be.

    Kind regards

    Carsten

  • Add the new column data IF

    Hi, can someone help with this...



    Select entered_on_date as START_DATE
    due_by
    id
    Object
    status
    resolution_date
    closed_date
    of XT_PORTAL
    where entered_on_date > = ' 01-SEPT.-10'
    entered_on_date ASC order

    which works very well.
    you want to put the new column entitled late...
    If closed_date is > resolution date fill in the column 'late' with 'Y '.
    If closed_date < resulution date fill in the 'overdue' column with "n".

    Published by: user11299998 on 10 Sep, 2010 08:02

    You can add additional code to deal with closed_date = resolution_date and if are NULL, but it's a start:

    CASE
    WHEN closed_date > resolution_date THEN 'Y'
    WHEN closed_date < resolution_date THEN 'N'
    END overdue
    
  • Add the new column to the table, having trouble adding to an existing form

    I added a new column to a table that has an existing report and on this form. I was able to get the new column in the report, but I can't seem to get in shape. Can anyone give me a suggestion as how to proceed without having to recreate the form?

    Have you added a new element of the new column and set the source type on DATABASE_COLUMN then the value from the source to your new column name?

    -Jeff

  • Add the new column on BSE page

    HII ALL

    I have a search page when I search on this page with a few criteria
    It shows a region of array type on what it shows all records in the db, that match this search criteria
    now, I want to add a column at the end of this table on the EBS page that displays
    and I want to show some value related to this record that is displayed on this table

    How can I get this value db linked to some folder basis

    and how do I set new column at the end of the table?

    Hussain

    Here are the steps you need to perform.
    1) go to the page with this region of the table. Click on this link page
    (2) check the name of the VO attached with the region of the table and click
    (3) in this page, you can see all of the attributes that are present in the original Version
    (4) if the new attribute you want to display exists in the vol. note his name.
    (5) create a new column in the region of the table through customization and attach this attribute VO with her as well as the view Instance.

    If this attribute does not exist in the original Version, then you must go for the extension of the VO.

    It could be useful!

    Thank you
    AJ

  • Add the new column to Admin tool, including the SQL Code

    Hi all

    I am new to OBIEE and I already searched here in the forum but have not found an exact answer which could help me.
    I have a table in the warehouse where to get information on employees. It's employe_id, manager_id and name.
    Example:
    Employe_id Manager_ID name
    1 Mueller
    2 1 Meier

    Now, I would like to create a new column in the Mapping BI Admin tool business layer and add a SQL where to select the name of the Manager.
    Is this possible? And how can we do it? It will work with a new logical column? Where we add the SQL Code?

    I hope someone can answer my question!
    Thank you very much!

    Kind regards
    David

    OK, I think I got it - the name of Manager is on a separate table (or a search to return to the current table) and your thinking that you want to label your SQL in the report to find the name of Manager based on Director ID, you have?

    If so, import the table with the names of Manager in the physical layer. If this is the same table that you already have (but want to search him in the current table) then you need to create an alias for the current table.

    For each new table in the Phy layer, or an alias - define the join (current_table.manager_id = manager_table_or_aliased_current_table.employee_id)

    Once completed, we will on the source of the logic table in the MDB for this dimension, edit, on the general tab, "Add" and select the table / alias that you created in the phy layer. Click OK - it combines now two tables attached as a source - you can then map the name of the Manager search in your column 'name '.

    Kind regards
    Alastair

  • Add the new column of data

    Hey guys, I have a question for you novice. I read 4 analog channels and write all four of them in a file in four columns. A part of my program is counting the number of digital ups (TTL) and indicating a ' cycle count "with a shift register. I want to put this ' cycle count ' as a new column in my data file, alongside the other 4, preferably in the first column. I tried to connect the County directly to the VI measures, but it is not separating in his own column... ideas?


  • Add the new column to the desired location in the table through customization?

    Hello world

    I made a few standard on oaf page customizations.
    I added 2 new columns to the existing table, but they were added at the end of the table.
    But I want a column to be the first and a column in the middle of the table.

    How can I achieve this?

    Please give me your valuable suggestions...

    Thank you.

    Hello

    Customize page, there is another icon for just before reorganization create icon.

    You can use and organize all the elements in the region of the table according to your requirement.

    Sushant-

  • Add the new column in the search of the Organization on the Create User page

    Hi all

    I have added a field defined by the user on the screen to create organization. (For example, country-> ACT_UDF_COUNTRY).

    Now, I want to display in the search for organization window. (i.e. when clicked on the image of research organization field on the form to create a user, the research we receive).

    Currently, this research only display the name of the company. I want to display two columns. for example, company name and country.

    I try to edit the file FormMetaData.xml and
    < attribute name = "-2"label ="request.requestDetail.organization" displayComponentType = "LookupField' variantType = dataLength 'long' = map ="Organizations.Organization "50" name">
    "< lookupMethod ValidValues ="findOrganizationsFiltered"operationClass ="Thor.API.Operations.tcOrganizationOperationsIntf"= displayColumns" Organizations.Organization Name, Organizations.Status, * ACT_UDF_COUNTRY * "selectionColumn ="Organizations.Organization name"/ >
    < / attribute >

    But it did not work...

    Kind regards
    Chaturanga

    You'll want to do the following:

    1. create a list of choices for the type of field with the domain being your UDF name and the name of the search as Oraganizations.Country.
    2. change your view columns in the post you made to be Organizations.Country.
    3. put to update your xlWebAdmin_en_US.properties for any country you use and in the section "LOOKUPFIELD column headers" add an "lookupfield.header.organizations.country" entry = Country

    Restart your IOM and it should now show.

    -Kevin

  • Create a table with the old table and add the new column

    I want to create a table from old table old table, condition is new table contains a sid column which contains the id of the series.


    sname name sid
    AAA 1A
    BBB 2B
    CCC 3 C
    4 DDD D
    5 EEE E

    Use a sequence.

    SQL> create table t
      2  as
      3  select level no
      4    from dual
      5  connect by level <= 10
      6  /
    
    Table created.
    
    SQL> select * from t
      2  /
    
            NO
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    
    10 rows selected.
    
    SQL> create sequence my_seq
      2  /
    
    Sequence created.
    
    SQL> create table t1
      2  as
      3  select no, my_seq.nextval no1
      4    from t
      5  /
    
    Table created.
    
    SQL> select * from t1
      2  /
    
            NO        NO1
    ---------- ----------
             1          1
             2          2
             3          3
             4          4
             5          5
             6          6
             7          7
             8          8
             9          9
            10         10
    
    10 rows selected.
    

    Thank you
    Knani.

  • SQL query on how to add a new column to display the result

    Select emp_code, < new column = 0 >
    from employee_table where < < condition > >

    syntax to add the new column?

    Published by: user9027633 on March 4, 2010 02:53

    user9027633 wrote:
    Select emp_code,
    from employee_table where >

    syntax to add the new column?

    Published by: user9027633 on March 4, 2010 02:53

    Want you like this

    selec emp_code, 0 new_column
      from employee_table
    
  • Unable to add a new column to the table of the LCD? Option, just usually add it.

    I have a form of LCD with a table in it. Im trying to simply add a new column to the table. The option is there, but the column appear just after clicking Add the column to the left. I selected a column, right click the space > insert > column to the left. But the habit intsert. The object table properties tab shows lines and colum numbers, but they are grey.

    See screenshots:

    http://www.emermed.NET/staging/forums...

    http://www.emermed.NET/staging/forums...

    It is a dynamic array, where a new line can be inserted using a button. Is that the dynamic nature of the question? ID hate to cancel all the flow dynamics and programming just to add a column, and then reapply them all.

    Thank you!

    Hello

    You do not add the columns in the object > palette (screenshot 2) of the Table. I suspect that the problem is that it is not enough on the page (in the content area) to add the column. In the screenshot 1, if you look at the width of the column highlighted from the space to the right of the table, you will see that a column can be added due to restrictions of space.

    Reduce the width of the column highlighted (temporarily), and then add a column. Once added, you can resize the columns to match the width of the page.

    Hope that helps,

    Niall

Maybe you are looking for

  • Link e-mail file has stopped working. How should I do?

    When I click on file/send link nothing happens. He slowed at the beginning of this week, and now it doesn't work at all.

  • playlists only to usb_windows7/itunes12.3.2/5th gen nano

    How can I move playlists ONLY on a USB?  Windows7/12.3.2 itunes/5thgen nano

  • put photos on a memory card, through my printer

    I'm not sure I have the right forum. I am trying to put pictures on a memory card, the card will then go on my digital photo frame, I put the card in my printer which is smart Photo 5520 and I use windows 7, when I did it before with another printer,

  • Omni touch screen does not

    Hello Can you please let me know how I can get get my Tablet repaired. The touchscreen is finicky last months, but now it has stopped all together. The only way to use the Tablet is with a mouse and a keyboard. I have restored the right of return to

  • How to remove downloaded updates for Windows 7

    How can I delete downloaded updates of Windows 7?  While the updates are being downloaded, apparently I lost my internet connection then maybe that these were not completely downloaded. When I was prompted to install the updates, I did.  During the s