• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Are Batch Sequences Possible ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Are Batch Sequences Possible ?


  • Subject: Are Batch Sequences Possible ?
  • From: Owen McKerrow <email@hidden>
  • Date: Tue, 30 Oct 2007 14:49:10 +1100

Hi All,

Im currently developing an app against a Oracle databas, which uses sequence for generating its Primary Keys.

Is there a way to get WO to request a batch of sequences instead of doing it one at a time ( which is what it appears to be doing when you output the SQL ). For example I am doing 1 save to the database that is inserting 142 rows into 1 table, 142 into a second and 711 into a third. Each of the 142 row table inserts takes 2 seconds to return all of the sequence while the 711 inserts take's 8 seconds to get the sequences. Thats 12 seconds used before it even starts the INSERT statements, which take another 2, 2 and 8 respectively. Meaning the total save time is 24 seconds ( with SQL debugging turned on, its a little quicker with it turned off ).

Please someone tell me Im doing something dumb, or that there is a better way.

Heres a cut down version of the SQL output......

14:22:44,154 DEBUG [WorkerThread2] (RQFBOWSelection:286 setUpPublicationsList) - Save Start.
14:22:44,415 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction
14:22:44,416 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "SELECT t0.pub, t0.ABSTRACT FROM PUB_ABSTRACT t0 WHERE t0.pub = ?" withBindings: 1:8657(pubID)>


Repeated 141 for 2 secconds

14:22:46,521 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction
14:22:46,522 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "SELECT RQF_GRP_PSN_PUB_SEQ.NEXTVAL FROM DUAL">


Repated 142 for  2 seconds

14:22:48,045 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction
14:22:48,046 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "SELECT AUDIT_LOG_SEQ.NEXTVAL FROM DUAL">


Repeated 711 for  8 seconds

14:22:56,928 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction
14:22:56,929 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "SELECT RQF_PUB_SEQ.NEXTVAL FROM DUAL">
Repeated 141 for . 2 seconds
14:22:58,782 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction
14:22:58,783 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "INSERT INTO RQF_PUB(NOTES, OUTLET_ANGLICISED_TITLE, LANGUAGE_OF_TITLE, LOCKED, TYPE_OTHER_DESCRIPTION, METRICS_IDENTIFIER, OUTPUT_IDENTIFIER, RQF_PUB, ENGLISH_TITLE, PUB, IS_REPRINT, SENSITIVITY_EXPLAINATION, AVALIABLE_YEAR, ANGLICISED_TITLE, IS_COMMERCIAL_SENSITIVE, TYPE_CODE, IS_CULTURALSENSITIVE, OUTLET_RANKING_IDENTIFIER, AVAILABILITY_FORM, OUTLET_ENGLISH_TITLE, AVAIL_STATUS_CODE, NON_REPOSITORY_JUSTIFICATION, YEAR_VARIANCE_JUSTIFICATION, RQF_YEAR) VALUES (NULL, NULL, NULL, ?, NULL, NULL, NULL, ?, NULL, ?, ?, NULL, NULL, NULL, ?, NULL, ?, NULL, NULL, NULL, ?, NULL, NULL, ?)" withBindings: 1:0(locked), 2:2266(rqfPUBID), 3:8430(pubID), 4:0 (reprint), 5:0(commercialSensative), 6:0(culturalSensative), 7:"R"(availabilityStatusCode), 8:21(rqfYearID)>


Repeatd 142  for  2 seconds

14:22:59,717 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "INSERT INTO RQF_GRP_PSN_PUB(PERSON, RQF_PUB, GRP, RQF_GRP_PSN_PUB, TYPE) VALUES (?, ?, ?, ?, ?)" withBindings: 1:12545 (personID), 2:2342(rqfPubID), 3:373(groupID), 4:2542 (rqfGrpPersonPubID), 5:1(type)>

Repeatd 141 for  2 seconds

14:23:00,368 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "INSERT INTO AUDIT_LOG(CLASSES_NAME, ATTRIBUTES_NAME, person, old_value, RIS_SESSION_ID, message, new_value, audit_log, ip_address, when, OBJECTS_PK) VALUES (?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, ?)" withBindings: 1:"Publication"(classesName), 2:"rqfDetails"(attributesName), 3:3462 (person_fk1), 4:"hSSnp5XU8DNKnd0MFSCRHM"(risSessionID), 5:"RELATIONSHIP_ADDED"(message), 6:"RQFPub:({values = {notes = <com.webobjects.foundation.NSKeyValueCoding$Null>; typeCode = <com.webobjects.foundation.NSKeyValueCoding$Null>; languageOfTitle = <com.webobjects.foundation.NSKeyValueCoding$Null>; locked = 0; metricsIdentifier = <com.webobjects.foundation.NSKeyValueCoding $Null>; outputIdentifier = <com.webobjects.foundation.NSKeyValueCoding $Null>; titleInEnglish = <com.webobjects.foundation.NSKeyValueCoding $Null>; rqfYear = "<RQFYear f2486b _EOIntegralKeyGlobalID[RQFYear (java.lang.Long)21]>"; publication = "<Publication 5d9805 _EOIntegralKeyGlobalID[Publication (java.lang.Long)10988]>"; reprint = 0; rqfGroupPersonBOWPubs = ("<RQFGroupPersonPubBOW e66ae7 <EOTemporaryGlobalID: 0 0 -126 -126 72 73 0 0 -39 3 -101 0 0 0 1 21 -18 -19 -49 65 -71 -42 -47 95>>"); sensitivityExplaination = <com.webobjects.foundation.NSKeyValueCoding$Null>; avaliabilityYear = <com.webobjects.foundation.NSKeyValueCoding$Null>; anglicisedTitle = <com.webobjects.foundation.NSKeyValueCoding$Null>; commercialSensative = 0; rqfGroupPersonOldBOWPubs = (); rqfGroupPersonNRPubs = (); anglicisedOutletsTitle = <com.webobjects.foundation.NSKeyValueCoding$Null>; outletRankingIdentifier = <com.webobjects.foundation.NSKeyValueCoding $Null>; culturalSensative = 0; otherTypeDescription = <com.webobjects.foundation.NSKeyValueCoding$Null>; avalaibleFrom = <com.webobjects.foundation.NSKeyValueCoding$Null>; outletsTitleInEnglish = <com.webobjects.foundation.NSKeyValueCoding $Null>; availabilityStatusCode = "R"; nonRepositoryJustification = <com.webobjects.foundation.NSKeyValueCoding$Null>; yearVariationJustification = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = "<RQFPub 10347e <EOTemporaryGlobalID: 0 0 -126 -126 72 73 0 0 -39 3 -102 0 0 0 1 21 -18 -19 -49 65 -71 -42 -47 95>>"; }){null}"(newValue), 7:1324858 (audit_log_pk), 8:"/130.130.72.73"(ipAddress), 9:2007-10-30 14:22:44 (when), 10:10988(objectsPK)>

Repeated 717 for 8 seconds

14:23:08,538 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) - === Commit Internal Transaction
14:23:08,575 DEBUG [WorkerThread2] (RQFBOWSelection:289 setUpPublicationsList) - Save End.




Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'The test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time and still be able to function.'
-F.Scott Fitzgerald,



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Are Batch Sequences Possible ?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: A final note
  • Next by Date: Re: Database choices
  • Previous by thread: Re: A final note
  • Next by thread: Re: Are Batch Sequences Possible ?
  • Index(es):
    • Date
    • Thread