Perfomance - OCI8 vs. OO4O
Hi, everyone.
I've developed a wrapper class with oci to replace the one which was developed with OO4O.
Now, I'm testing its performance and a problem came out..., it's just too slow.
Since I am still kind of new to an oci programming, I have no idea where to look at to improve
its performance. The developing and testing environment info and its result as follows:
[Developing Environment]
Software: VC++ 6.0
OCI ver: 8
[Testing Environment]
-Server
OS: Windows2000 & System_V
Oracle: 8i
-Client
OS: Windows2000
Oralce: 8i Client
[Result]
SQL statement = " Select * from test"
-Time to retreive 10000 records.
*Windows2000 Server 1st 2nd 3rd Avg.
OO4O 1937 1875 2203 2005 ms
OCI 7265 7078 7094 7145 ms
*System_V Server 1st 2nd 3rd Avg.
OO4O 2234 2203 2188 2208 ms
OCI 7532 7421 7500 7484 ms
[OCIStatement that I used]
OCIInitialize( OCI_THREADED|OCI_OBJECT,...);
OCIEnvInit(...);
OCIHandleAlloc( ...,OCI_HTYPE_ERROR,...);
OCIHandleAlloc( ...,OCI_HTYPE_STMT,...);
OCILogon();
OCIAttrSet( ...,OCI_HTYPE_STMT,...,OCI_ATTR_PREFETCH_ROWS,...); /* Set to 4000 */
OCIStmtPrepare( ...,OCI_NTV_SYNTAX, OCI_DEFAULT);
/* two following statements loop 10000 times */
OCIStmtExecute(g_pSvc, m_pStmt, g_pErr, 0, 0, 0, 0, OCI_DEFAULT);
OCIStmtFetch( ..., OCI_FETCH_NEXT, OCI_DEFAULT );
OCIServerDetach( ...OCI_DEFAULT))
/* Statements to free handles continue... */
Well, I also should concern about the network traffic, but I thought I can ignore it
because the result is obviouse enough to conclude that OCI is slower than OO4O.
Any information or assistance would be helpful.
Thanks.
masatakasaito