Re: OCCI optimization

From: Dave Hau <davehau_nospam_123_nospam_at_netscape_nospam_.net>
Date: Thu, 23 Oct 2003 00:04:39 GMT
Message-ID: <rWElb.3291$D%6.1767_at_newssvr25.news.prodigy.com>


The high CPU usage could be due to STL overhead. When you update the 4th table that contains ASCII text fields, try to stay away from STL by not using setString() and STL string. Instead, allocate a data buffer, bind the buffer to the variable using setDataBuffer(), and then write directly into the buffer using strcpy() from string.h, traversing the buffer using pointer arithmetic for each record you want to store. This is equivalent to doing an array insert directly in OCI and should be much faster.

HTH,
Dave

"Ron Harter" <ron.harter_at_abbnm.com> wrote in message news:vpdonj10vp496a_at_corp.supernews.com...
>
> We have a server application that uses OCCI to store data into an Oracle
table.
> The application uses a lot of CPU time and we need to optimize it somehow.
> We currently store data into 4 tables, 3 of the tables are very similar
and
> the 4th is made up of 5000 records that contain ASCII text in all fields.
>
> We currently update a hundred records at time for the ascii text records
> and 250 records at a time for the other 3 tables, they contain numeric
information
> and are approximatly 60 bytes in size.
>
> Is there some optimum number of records for OCCI that will speed the
updates?
> The tables are indexed based on 2 fields of the record. One table has
220,00
> records, another has 160,000 and the other has 600.
>
> The tables can not be combined into a single table.
>
> Any got any suggestions?
>
>
> Regards
>
> Ron Harter
> ron.harter_at_abbnm.com
Received on Thu Oct 23 2003 - 02:04:39 CEST

Original text of this message