8 messages in com.mysql.lists.win32performance suggestions?? mysql_use_r...
FromSent OnAttachments
Derick Smith12 May 2003 12:57 
Derick Smith13 May 2003 06:14 
Anthony R. J. Ball13 May 2003 09:50 
Petr Vileta13 May 2003 15:28 
Derick Smith14 May 2003 08:24 
Anthony R. J. Ball14 May 2003 09:17 
Derick Smith14 May 2003 09:52 
Petr Vileta14 May 2003 15:58 
Subject:performance suggestions?? mysql_use_result/mysql_store_result
From:Derick Smith (niag@hotmail.com)
Date:05/12/2003 12:57:07 PM
List:com.mysql.lists.win32

Hi! Can anyone recommend ways to speed up mysql.

I found that mysql_use_result was around 10 second faster for the query I was running. But are there any other suggestions people can make to increase speed?

I will have to execute an SQL query several time (hundreds/thousands) and store the results from each query in a text file. I am currently matching a fixed length char field. I have unique/normal indexes on this field where possible.

What suggestions can be made to increase the speed of this query:

-Increase/decrease the size of the char field? -Use a different data type(s)? -Break the char field into 2 fields? -Some how convert the char field to a numeric field and store it in the database that way (integer SQL SELECTs are faster?)? -I am using mysql_real_query -> mysql_use_result -> mysql_fetch_result -> mysql_free_result in each iteration, is there another sequence that is faster? other commands? -Other suggestions???

I was originally using a home grown database which took around 1 second to execute, now it takes around 40-50 seconds to execute. (for number of records in the sample I was running)

Any advice is appreciated.

Thanks Eric