On 08 May 09, at 07:08, spartan g wrote:
But the problem I am facing now is, once i sent the query to MySQL
through
SMySQL framework, I am unable to cancel it. This query takes so much
time to
return the results and cannot be canceled as far as I understand.
Is there any way to cancel this query??? any command or API!!!
No. The MySQL C API [1] is synchronous, and provides no method to
cancel a query that's in progress. Indeed, the network protocol
doesn't either - the only way to stop a query that's running is by
using the MySQL KILL command to terminate the connection.
If you are ending up with queries that run for 15 to 20 minutes, you
probably need to do one or more of the following:
1. Adjust your database schema to make these queries run faster
2. Fetch smaller chunks of data at a time using the LIMIT modifier
on queries
3. Change your application so that it performs more efficient queries
All of these are really outside the scope of Cocoa development,
though. You may have better results asking on a MySQL-specific mailing
list or forum.
[1]: http://dev.mysql.com/doc/refman/5.1/en/c.html
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com