Re: Row and Statement based Trigger Question > Speed, mostly. This is a JDEdwards OneWorld site, so any batch work
> will be written in the OneWorld toolset, and will likely end up bing
> millions of individual inserts and deletes. The process would take
> many days for some of the files.
>
When all you have is a hammer, every problem lokos like a nail. :-)
This is an ideal job for a couple of simple SQL statements (that can
be run from a simple CL program if required).
Something like:
CREATE TABLE archive as SELECT * FROM mainfile WHERE date < sometime
WITH DATA
and
DELETE FROM mainfile WHERE date < sometime
should do the trick (N.B. I haven't checked the syntax of these, but
you get the idea), with an index over the 'date' field for performance
reasons.
In future a simple CPYF *ADD command with a date selection could move
records from mainfile to archive, and the SQL delete perform the tidy-
up. |