I am trying to lower the number of Oracle DB roundtrips to get primary 
keys/sequences.

I have tried setting the following Wonder properties
-er.extensions.ERXJDBCAdaptor.className er.extensions.jdbc.ERXJDBCAdaptor
-er.extensions.ERXPrimaryKeyBatchSize 1

and changing one of my entities user info dictionary to:

    userInfo = {
        "_EntityModeler" = {generateSource = NO; };
        modificationDate = "2000-04-20 12:37:17 -0700";
        ERXPrimaryKeyBatchSize = 10;
    };

Now Wonder select 10 primary keys and caches them. The only issue is JDBC does 
not allow batching of select so this only changes the sequence of how the 
primary keys are fetched. This causes a database roundtrip for each primary key 
needed.

I am wondering if anyone has subclassed ERXJDBCAdaptor or JDBCAdaptor and 
created an adaptor the uses the Oracle sequence increment to reduce database 
roundtrips to acquire a “batch” of sequences.

— Oracle query sequence increment value to determine the sequence "batch size".
SELECT INCREMENT_BY FROM ALL_SEQUENCES WHERE SEQUENCE_NAME=’TABLE_NAME_SEQ';

— Oracle change sequence increment to 10 ("batch size" to 10)
ALTER SEQUENCE TABLE_NAME_SEQ INCREMENT BY 10;

JR
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to