2 messages in com.mysql.lists.gui-toolsRe: Matlab, C++ API, and speeding up ...
FromSent OnAttachments
Ken Senior14 Jul 2003 09:53 
Adam Majer15 Jul 2003 13:16 
Subject:Re: Matlab, C++ API, and speeding up large queries
From:Adam Majer (ada@galacticasoftware.com)
Date:07/15/2003 01:16:01 PM
List:com.mysql.lists.gui-tools

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