SQL optimization in COBOL400

105 pts.
Tags:
AS 400
CL
cl 400
COBOL 400
SQL
I am using an SQL in Cobol 400 to delete around 100 million records out of 200 million records based on a date. What is the best way to delete this much data in one stretch? The file has key as date. My sql would look like Delete from FileA where Date < 'some date'

Software/Hardware used:
iseries
ASKED: August 31, 2013  5:14 PM
UPDATED: September 1, 2013  8:45 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    I'm not sure there is any optimization possible. The query is as simple as it can get.

    If you have plenty of extra disk space, you might be better off copying the rows that you want to keep into a new table, then clear the original table and copying the temporary table back into your original table.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following