Re: Recommended Lock Mode for heavy JDBC usage?
Posted in 2003
Topics: Performance & Tuning, SQL Development & Query Writing, Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
So, it's REALLY bad to reply to ones own messages.... I've tried dropping and reloading the table, to no avail. Today, I went through and created some new routines to grab the rows at less than 50 at a time (in testing, I actually used values around 30). I also wrote a routine that grabs all 65K rows at one time. Both of them read and load into memory 8175 rows before crashing, always with the same error. I then redid the routines to start with the id of 8170, and start from there. It loads another 8175, then dies. Always, 8175 rows are read. Is this a performance issue? Is Informix doing some juggling and "closing" the db file? Any other ideas? I'm about at my wits end. --Anthony anthony@zoraptera.com (Anthony Presley) wrote in message news:<a55ad738.0305271232.5f0fe7ba@posting.google.com>... > Sorry for the cross-post, but it applies in both places :-( > > I'm writing several database conversion utilities for a client, under > Informix 7.31.UD2, which run fairly well. > > However, during the conversion of some 56,000 rows, I've got about > twelve errors for "Could not position within a table > (anthony.milestonedef). -243". Error -243, but it recommends looking > at OS errors, if not there, then ensure that the table's aren't > corrupted. > > My tables are not corrupted, nor is anything wrong with the hardware. > However, if I run the program by limiting the number of fetches to the > new database (SELECT statements), or by limiting the number of rows > converted at a time, it runs without errors. > > I'm accessing everything through JDBC, and my conversion routines are > all done in Java. My lock mode is set to row, and I've placed within > my routines the statements: "SET LOCK MODE TO WAIT", and I'm still > getting these errors. > > As a test, I ran a Java program which queries the database and yanks > some 65,000 rows from it. About half-way through, I get the same > error, and it dies. However, while watching the memory, it never uses > everything it has at its disposal, so I assume the problem is LIKELY > with the db, or JDBC driver. > > What can be done, if anything, about this? Is there a recommended > "lock mode"? How can I force the Informix JDBC driver to WAIT (if > that's the problem)? > > Thanks. > > --Anthony
"Anthony Presley" <anthony@zoraptera.com> wrote in message news:a55ad738.0305312214.2e29b393@posting.google.com... > So, it's REALLY bad to reply to ones own messages.... > > I've tried dropping and reloading the table, to no avail. > > Today, I went through and created some new routines to grab the rows > at less than 50 at a time (in testing, I actually used values around > 30). I also wrote a routine that grabs all 65K rows at one time. > > Both of them read and load into memory 8175 rows before crashing, > always with the same error. I then redid the routines to start with > the id of 8170, and start from there. It loads another 8175, then > dies. Always, 8175 rows are read. > > Is this a performance issue? Is Informix doing some juggling and > "closing" the db file? Any other ideas? I'm about at my wits end. > - Try the query using dbacess on the server. - Go to http://www.iiug.org/software/index_JAVA.html and get jselect. Try the query using that. - Log a support call with Informix. > --Anthony > > anthony@zoraptera.com (Anthony Presley) wrote in message news:<a55ad738.0305271232.5f0fe7ba@posting.google.com>... > > Sorry for the cross-post, but it applies in both places :-( > > > > I'm writing several database conversion utilities for a client, under > > Informix 7.31.UD2, which run fairly well. > > > > However, during the conversion of some 56,000 rows, I've got about > > twelve errors for "Could not position within a table > > (anthony.milestonedef). -243". Error -243, but it recommends looking > > at OS errors, if not there, then ensure that the table's aren't > > corrupted. > > > > My tables are not corrupted, nor is anything wrong with the hardware. > > However, if I run the program by limiting the number of fetches to the > > new database (SELECT statements), or by limiting the number of rows > > converted at a time, it runs without errors. > > > > I'm accessing everything through JDBC, and my conversion routines are > > all done in Java. My lock mode is set to row, and I've placed within > > my routines the statements: "SET LOCK MODE TO WAIT", and I'm still > > getting these errors. > > > > As a test, I ran a Java program which queries the database and yanks > > some 65,000 rows from it. About half-way through, I get the same > > error, and it dies. However, while watching the memory, it never uses > > everything it has at its disposal, so I assume the problem is LIKELY > > with the db, or JDBC driver. > > > > What can be done, if anything, about this? Is there a recommended > > "lock mode"? How can I force the Informix JDBC driver to WAIT (if > > that's the problem)? > > > > Thanks. > > > > --Anthony