Here is a 10 pt bonus question for all you java gurus -
I am an oracle dba and do not know java at all. My developer created a java link that will tie another on-line non-oracle db on another server that sends up to 500,000 messages/day to an oracle 817 db. The messages can update any of 7 tables. Any two succeeding messages updating the same table can vary in that other than the primary and secondary key columns, any of the other columns may or may not be present. For example, if there is a table_a with key_1, col2, col3, col4 columns, key1 and col2 may have to be present for every insert, but col3 and col4 are optional. Within his code are java statments that compose the sql insert statements to be executed for each incoming statement. There are no oracle specific options in these update statements - they are straight and simple inserts which in the actual columns that are updated from message to message. With each incoming message any combination of 1 to 7 tables may have insert updates. We are most interested in throughput so optimizing execution speed is uppermost. I can address the oracle issues except one. We do not know whether to compose 7 statements entirely in java (one for each table) and then execute it, or do we set up a stored procedure for each of 7 tables and pass the incoming fields as data or null to the procedure? My developer thinks the composed statement is compiled once and interpreted once until the next db shutdown or restart of the link. I strongly suspect otherwise - that since each statement is not stored in oracle as a sp - it must be re-interpreted and recompiled for each execution for each new message by oracle. He refers to the java statements as "prepared statements" creating "static sql" which is compiled. We have not high volume testing yet. Help
I am an oracle dba and do not know java at all. My developer created a java link that will tie another on-line non-oracle db on another server that sends up to 500,000 messages/day to an oracle 817 db. The messages can update any of 7 tables. Any two succeeding messages updating the same table can vary in that other than the primary and secondary key columns, any of the other columns may or may not be present. For example, if there is a table_a with key_1, col2, col3, col4 columns, key1 and col2 may have to be present for every insert, but col3 and col4 are optional. Within his code are java statments that compose the sql insert statements to be executed for each incoming statement. There are no oracle specific options in these update statements - they are straight and simple inserts which in the actual columns that are updated from message to message. With each incoming message any combination of 1 to 7 tables may have insert updates. We are most interested in throughput so optimizing execution speed is uppermost. I can address the oracle issues except one. We do not know whether to compose 7 statements entirely in java (one for each table) and then execute it, or do we set up a stored procedure for each of 7 tables and pass the incoming fields as data or null to the procedure? My developer thinks the composed statement is compiled once and interpreted once until the next db shutdown or restart of the link. I strongly suspect otherwise - that since each statement is not stored in oracle as a sp - it must be re-interpreted and recompiled for each execution for each new message by oracle. He refers to the java statements as "prepared statements" creating "static sql" which is compiled. We have not high volume testing yet. Help