Loading ASCII data
Posted in 1994
In Message-Id: <9411160344.AA02331@rmy.rmy.emory.edu> Dan Madvig - Bethel College & Sem. <daniel@genesis.admin.bethel.edu> writes: } Anybody know how many locks are used per row when one is loading data } into a table? I'm trying to load 110,000 rows from a pipe-delimited } ASCII file into a table. } } load from "/tmp/ASCIIfile" } insert into so_and_so_rec } # ^ } # 271: Could not insert new row into the table. } # 847: Error in load file line 42836. <<<------ This number varies } slightly each time } I try the load. } } Though you might not think so from the error messages, I'm quite sure } I'm running out of locks. When I start the process, tbstat -k shows } about 3000 locks. Near the time the load fails the tbstat shows over } 240,000 locks (260,000 max). After it fails the number of locks drops } immediately back to ~3000. } } But the process only loaded ~42,000 rows! Am I to conclude that each } row loaded takes six locks? For what? I've heard of "locking twins", } but ... } } -- } Dan Madvig e-mail: d-madvig@bethel.edu } Bethel College & Seminary phone: (612) 638-6414 } 3900 Bethel Drive fax: (612) 638-6001 } St. Paul, MN 55112 } } " , ." - Marcel Marceau I don't know how many locks the load uses, but I have seen it grow in a fashion similar to what you see. I get around the whole problem by using "lock table in exclusive mode", thus using only one lock. This will keep other users out of the table during the load, but that's the price you pay. When I've run out of locks on a load before I had *horrible* problems with the indexes and the table itself getting corrupted. Check carefully for these things in your tables. BTW, what in the world are you doing that keeps ~3000 locks open? (We run Good lock, __________________________________________________________________ | Clem Akins Standard Disclaimers Apply | | Reynolds Metals Co. "Climb High, Cave Deep!" | | Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com | |________________________________________________________________|