Re: Informix C++ API Performance
Posted in 2003
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_Fields@azb.uscourts.gov> wrote in message news:<bmml0o$dmv$1@apollo.nyed.circ2.dcn>... > 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" <nrajput@manh.com> wrote in message > news:7bef655f.0310160905.6c8e3149@posting.google.com... > > 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