vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I presently use an SQL SP with cursors to cycle through records to update, insert etc. Within this I maintain a variable for a commit count, as in before I FETCH the next record I increment v_commit_cnt = v_commit_cnt + 1. I use an IF v_commit_cnt > say 1000 then COMMIT and set v_commit_cnt = 0 and so on. If we can now use MERGE to do similar processing as above [insert / update], how can you now force frequent commits when dealing with a very large number of records ? Any ideas would be appreciated. Cheers .. Tim |
| |||
| Giganews wrote: > I presently use an SQL SP with cursors to cycle through records to update, > insert etc. Within this I maintain a variable for a commit count, as in > before I FETCH the next record I increment v_commit_cnt = v_commit_cnt + 1. > I use an IF v_commit_cnt > say 1000 then COMMIT and set v_commit_cnt = 0 and > so on. > > If we can now use MERGE to do similar processing as above [insert / update], > how can you now force frequent commits when dealing with a very large number > of records ? > > Any ideas would be appreciated. > > Cheers .. Tim > MERGE doesn't have built-in commit capabilities if that's what you're asking for. Cheers Serge -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab |
| |||
| So Serge, if we are dealing with a couple of million records to update then how do you get around log file full conditions etc ? > > > MERGE doesn't have built-in commit capabilities if that's what you're > asking for. > > Cheers > Serge > > -- > Serge Rielau > DB2 SQL Compiler Development > IBM Toronto Lab |
| ||||
| Three choices: 1) NOT LOGGED INITIALLY - if you are comfortable with it 2) Chunk your input 3) Why do you logfiles fill up? DB2 does automated log file maagement if you let it. Not my area of expertiese, but I'm sure someone in this group knows that side. Cheers Serge TD wrote: > So Serge, if we are dealing with a couple of million records to update then > how do you get around log file full conditions etc ? > > >>MERGE doesn't have built-in commit capabilities if that's what you're >>asking for. -- Serge Rielau DB2 SQL Compiler Development IBM Toronto Lab |