I've had similar lag times before when I had implicitLocking=true
in OJB.properties. I almost always set implicit locking to false and handle the locking "manually" within the transaction. Try it and see if you get different results. Jon French Programmer ECOS Development Team [EMAIL PROTECTED] 970-226-9290 Charles Harvey III <[EMAIL PROTECTED]> 10/12/2005 02:37 PM Please respond to "OJB Users List" <[email protected]> To OJB Users List <[email protected]> cc Subject impossibly long insert time for one object Hello. My application is taking "years" to insert an object and I can't figure out why for the life of me. For starters, my test DB is in a different location than my dev box, so there is a lag time, and I am ok with that. But for one specific object the lag time is huge. It is slightly faster when I put the app in production because of the proximity to the database. Here are my log statements from my test case as an example: ----------------------------------------------------------------------- 4686 INFO (CalculateLogic.java:177) :: quizReport created: \ [EMAIL PROTECTED] 4703 INFO (OJBRepositoryDefaultImpl.java:567) :: \ Inserting Object [com.alloyinc.quiz.bean.QuizReport]. [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] \ DEBUG: SQL:INSERT INTO QUIZ_REPORT (quiz_id,date_time_taken) VALUES (?,?) 20652 INFO (CalculateLogic.java:181) :: quizReport inserted: \ [EMAIL PROTECTED] -- getId(): 537986 ----------------------------------------------------------------------- See here, there is a pretty good lag time to insert QuizReport. But that's not the lag time I'm talking about: ----------------------------------------------------------------------- 20653 INFO (CalculateLogic.java:190) :: questionAnswer created: \ [EMAIL PROTECTED] 20678 INFO (OJBRepositoryDefaultImpl.java:567) :: Inserting Object \ [com.alloyinc.quiz.bean.QuestionAnswer]. [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG: \ SQL:INSERT INTO QUIZ_QUESTION_ANSWER (question_answer_value,question_id, \ quiz_report_id) VALUES (?,?,?) 112932 INFO (CalculateLogic.java:202) :: questionAnswer inserted: \ [EMAIL PROTECTED] -- getId(): 3168835 ----------------------------------------------------------------------- 15949 ms for the first object. 92254 ms for the second object. 15 seconds I can attribute to our network connection (hopefully). But 92 seconds - a minute and a half. No way. And its not much faster when I do it from a server next to the DB. Any ideas? Could it be the data structure? A setting in OJB? Something wrong with the database (MSSQL)? Any ideas are extremely helpful. Thanks a lot. Charlie --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
