View Full Version : OCCI optimization
Ron Harter
10-22-2003, 12:05 PM
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@abbnm.com
Dave Hau
10-22-2003, 04:04 PM
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@abbnm.com> wrote in message
news:vpdonj10vp496a@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@abbnm.com
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.