Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Informix C++ API Performance

22 views
Skip to first unread message

Nitin Rajput

unread,
Oct 16, 2003, 1:05:41 PM10/16/03
to
Hi -
I suspect that Informix C++ client side programming API is an
order of magnitude slower than ODBC calls as far as simple selects
from database are concerned( The SQL is like "select distance from
distance_table"). (Approximately) I do the following in C++.This
while loop is executed million times -
ITCursor cursor(_consDBConnection.GetConnection());
cursor.Prepare( LOAD_SQL );
cursor.Open(ITCursor::ReadOnly)
while( row = cursor.NextRow() )
{
int colIndex = 0;
ITValue* ITV_dist = row->Column(colIndex++); // distance
Lfloat distance ;
ITConversions *c;
if (value->IsNull() == false)
{
if (value->QueryInterface(ITConversionsIID, (void **) &c) ==
IT_QUERYINTERFACE_SUCCESS)
{
c->ConvertTo(retVal);
}
c->Release();
}

// Create an object from the data read
/* ...
*/

ITV_dist->Release();
row->Release();
}// while( row = cursor.NextRow() )

The code for doing the same thing in ODBC is much faster.

1) Is it true that Informix C++ API has performance problems wrt ODBC
?
2) Am I using the C++ API in the right way ?

Thanks a lot
nitin

William Fields

unread,
Oct 16, 2003, 1:37:05 PM10/16/03
to
FYI - we did some performance tests between ODBC and OLEDB using the
Informix SDK v2.81 and found that the ODBC drivers were 20-30% faster at
retrieving our data than the OLEDB provider.

--
William Fields
MCSD - Microsoft Visual FoxPro
MCP - Win2k Pro
US Bankruptcy Court
Phoenix, AZ

"While the complexity of this project is
several orders of magnitude less than
modeling heat flux in a fossil-fuel fired
electric utility plant using the Hottel Zone
technique, the context of each project
evolves in a remarkably similar fashion."
- Author Unknown


"Nitin Rajput" <nra...@manh.com> wrote in message
news:7bef655f.03101...@posting.google.com...

Nitin Rajput

unread,
Oct 16, 2003, 5:15:30 PM10/16/03
to
1) We are working on HPUX. I think OLEDB is not applicable to this.
Also the C++ performance lags behind the ODBC by a factor of 10. I
believe it may have to do with something related to ITValue /
QueryInterface. But not sure.

2) Anyway thanks for the piece of information that you have provided.
so ODBC is fast (atleast on windows platform). But I am looking for
the reasons and solutions to the (such a )slow performance of C++
Programmign API on HPUX 11.

- nitin

"William Fields" <Bill_...@azb.uscourts.gov> wrote in message news:<bmml0o$dmv$1...@apollo.nyed.circ2.dcn>...

0 new messages