I am working on CPP code where i am using OCCI for connecting to database and perform actions like INSERT, UPDATE, DELETE etc. on different tables (which includes huge tables which contain millions of records).
I have requested for AWR report from our DBA and during its analysis, i found that, number of "parse calls" for UPDATE and INSERT on two tables is too high.
As part of code, what i am doing is to call a function called Updatetable, where i define Updatetable function as below:
Statement *stmt = conn->createStatement (" UPDATE table set data1 =:1 where data2 =:2");
updateCnt = stmt->executeUpdate();
This function is called, once per "Oracle queue message" and which means, if i have 2000 messages, it will be called for 2000 times. Also gets parsed by 2000 times.
I have tried to reduce parse counts, by declaring and defining "createStatement" outside this function, but end up with "Segmentation fault".
So, please let me know if there is any other way to get the parse calls reduced.
Thanks in Advance!