Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73

    Unanswered: DB - DDL - how much time each operation takes - a doc needed

    Is there a doc describing how much time each DDL can take,
    e.g. (n is the number of records in the table):
    add nullable column = 0(1)
    add column with default falue = o(n)
    etc'...



    Tal Olier
    otal@mercury.co.il

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    I haven't seen any documentation. Unfortunitly this isn't a simple answer. If you are adding an attribute to the end of a table or deleteing an attribute from the end, then it should go quick.
    If you use EM to insert or delete an attribute in the middle then EM creates the new table with the name Tmp_<table name>, inserts the data from your table into the Tmp_ table, Drops the current table and renames the Tmp_ table to the correct name, adds any constraints, and finally adds and indexes. The time it takes EM to do all of this will depend on the number of rows in the original table.

    Did this answer your question?
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73
    Originally posted by Paul Young
    I haven't seen any documentation. Unfortunitly this isn't a simple answer. If you are adding an attribute to the end of a table or deleteing an attribute from the end, then it should go quick.
    If you use EM to insert or delete an attribute in the middle then EM creates the new table with the name Tmp_<table name>, inserts the data from your table into the Tmp_ table, Drops the current table and renames the Tmp_ table to the correct name, adds any constraints, and finally adds and indexes. The time it takes EM to do all of this will depend on the number of rows in the original table.

    Did this answer your question?
    No it hasn't, I am looking for something like:

    # Operation DB Type Example Time
    1 Rename a table Oracle Alter table x rename .. o(1)
    MS-SQL Sp_rename o(1)
    2 Rename a index Oracle Alter index x rename.. o(1)
    MS-SQL Sp_rename t.x.. o(1)
    3 Add column Oracle Alter table x add y NULL o(1)
    Oracle Alter table x add y default (10)/default(null) o(n)
    MS-SQL Alter table x add o(1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •