Hi,
I'm a new SOCI user. I like its interface and simplicity. But I'm
rather surprised to see that SOCI's performance is much inferior in
comparison to PHP when iterating a large table. I guess I could be
doing something wrong since the difference is huge. The C++ code took
one minute to iterate a table with more than 50,000 rows, while the
equivalent PHP code took only one second.
My environment:
OS: RHEL5.2 x64
DB: mysqld 5.0.45
C++: gcc-4.3.1, statically linked to SOCI 3.0
PHP: 5.1.6
C++ code:
rowset<row> rs = (m_db_session.prepare << "SELECT firmwareversion,
objtype, category "
"FROM FCPObject WHERE accepted_flag = 1");
for (rowset<row>::const_iterator it = rs.begin(); it != rs.end(); ++it)
{ }
PHP code:
$query = "SELECT firmwareversion, objtype, category ".
"FROM FCPObject WHERE accepted_flag = 1";
$result = mysql_query($query, $link);
while ($row = mysql_fetch_row($result))
{ }
Regards,
Tianhao
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users