Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > how to archive ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 8796 of 9053
Post > Topic >>

how to archive lots of records

by John Hopfield <Hopfield@[EMAIL PROTECTED] > Apr 16, 2008 at 03:31 AM

hi all,

I have a table with lots of stock movements.  ( stockmovements)
Once per year the user need to run a routine that move these records
into a table (history) and delete the movements from the original
table (stockmovements).

My application is writtend in Borland Delphi. (interfacing with db2
with sql statements and stored procedure written in SQL)

I have tried different solutions but without success:

1) an "atomic" sql insert/delete of all movements. this is impossible
because of log size.
2) a loop of  "atomic" sql insert/delete statements restricted to a
fixed number of records each time: but in my situation this take a
very long time.(4 hr) (i think because the "history" table is very
very large...and so..the insert statement take very long time)
3) a "manual" procedure of export to ixf...and load...: this is very
fast and i prefer this solution... but i can't provide this solution
like an interactive procedure for the user (i don't know how to do
these command of export / load in SQL)... moreover: i think i can't
launch these statements while users are connected to database...

Have you a solution for this kind of problem?
Maybe i have a bad design of my tables? (suggestions?)

(sorry for english mistakes)
JH




 8 Posts in Topic:
how to archive lots of records
John Hopfield <Hopfiel  2008-04-16 03:31:25 
Re: how to archive lots of records
Lennart <Erik.Lennart.  2008-04-16 05:41:48 
Re: how to archive lots of records
John Hopfield <Hopfiel  2008-04-16 06:09:08 
Re: how to archive lots of records
Larry <larry@[EMAIL PR  2008-04-16 10:43:11 
Re: how to archive lots of records
jefftyzzer <jefftyzzer  2008-04-16 10:52:23 
Re: how to archive lots of records
Lew <sethwai@[EMAIL PR  2008-04-17 04:02:58 
Re: how to archive lots of records
John Hopfield <Hopfiel  2008-04-17 06:41:06 
Re: how to archive lots of records
"Dave Hughes" &  2008-04-18 07:05:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 22:58:43 CDT 2008.