On Mon, Jul 14, 2003 at 12:54:02PM -0400, Ken Senior wrote:
Does anyone have any advice on speeding up applications which return a
large number of rows using the C++ API? In particular, I have the C++
program written by Robert Almgren at
http://www.math.toronto.edu/almgren/mysql/ which interfaces Matlab and
the C++ API. It would be advantageous to pre-allocate the size of the
matrix returned to Matlab based on the number of rows in the query. I
suspect this would speed things up, but I'm not sure the best way to go
about it.
Hmm. wrong list?? Why not just use the C API? It is much "simpler" and
not messed-up like the C++ with respect to NULL fields.
Yhen you can use mysql_use_results() instead of mysql_store_results().
The later one reads all data into a data structure while mysql_use_results()
doesn't do that.
- Adam