Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    206

    Unanswered: Tuning a Delete in DB2

    Hello Guys,

    Today I started a "delete from schema.example" and it takes hours ...
    Is there a way of making this faster?

    Thanks in advance!

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    9.7 - TRUNCATE command

    pre-9.7
    IMPORT FROM /dev/null of del replace into <tname>
    ALTER TABLE <tname> NOT LOGGED INITIALLY WITH EMPTY TABLE
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2010
    Posts
    206
    Thanks Dude! :-)

  4. #4
    Join Date
    Jan 2010
    Posts
    335
    Quote Originally Posted by sathyaram_s View Post
    ...
    pre-9.7
    IMPORT FROM /dev/null of del replace into <tname>
    ALTER TABLE <tname> NOT LOGGED INITIALLY WITH EMPTY TABLE
    I'ld prefer the import command, because i does not cause trouble in case of a restore.

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    i agree with nvk@vhv and guess TRUNCATE's the same
    Last edited by sathyaram_s; 04-07-11 at 09:11.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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