Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005

    Unanswered: row commit interval in a delete query

    can we write row commit interval in a delete query? Its not a transaction.

  2. #2
    Join Date
    May 2003
    Not in a single SQL statement, although you can write some procedure code to do it. You can also limit the number of deletes performed, and then keep submitting the same SQL statement until all the rows are deleted (which would be the same single SQL statement, but submitted multiple times).

    You can also alter the table to "not logged initially" and delete the rows in the same unit of work, and then commit, which will not log the deletes. However, be aware that if things go bad, your database may be hosed, since that is a non-recoverable transaction.

    Another option is to export the rows you want to keep, and load-replace them back into the table.
    Last edited by Marcus_A; 10-27-08 at 07:46.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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