Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2014
    Posts
    3

    Unanswered: Insert, update too slow on trunctated table

    Hi to everyone


    I have one table with around 1,000,0000 records, for mistake I truncate the table. And then i loaded a backup in text of that table.

    after this, when i insert or update one record in this table, it takes too many time to do the insert or update.

    This table has several foreign key, primary key, and indexes.

    I don't know what to do, i think i need to rebuild the indexes but i'm not sure.

    Could someone please help this newbie?, thanks in advance

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    > when i insert or update one record in this table, it takes too many time to do the insert or update.

    post EXPLAIN PLAN & actual SQL so we can see where time is being spent.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2014
    Posts
    3
    Quote Originally Posted by anacedent View Post
    > when i insert or update one record in this table, it takes too many time to do the insert or update.

    post EXPLAIN PLAN & actual SQL so we can see where time is being spent.
    hi anacedent,

    i'm sorry but, what do you mean with "post EXPLAIN PLAN",

    i'm sorry but, i'm not an english native speaker nor oracle expert,
    i don't understand what that means

    Thank you a lot

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    EXPLAIN PLAN

    Code:
    SQL> set autotrace traceonly explain
    SQL> select sysdate from dual;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1388734953
    
    -----------------------------------------------------------------
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    -----------------------------------------------------------------
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    -----------------------------------------------------------------
    
    SQL>
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Also, have you generated up to date statistics on your schema. It can make a major difference.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Tags for this Thread

Posting Permissions

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