If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > row commit interval in a delete query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-08, 06:30
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
row commit interval in a delete query

can we write row commit interval in a delete query? Its not a transaction.
Reply With Quote
  #2 (permalink)  
Old 10-27-08, 06:42
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 10-27-08 at 06:46.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On