• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cancel NSThread - cocoa/mysql database search...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cancel NSThread - cocoa/mysql database search...


  • Subject: Re: Cancel NSThread - cocoa/mysql database search...
  • From: Andrew Farmer <email@hidden>
  • Date: Fri, 8 May 2009 15:08:58 -0700

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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Cancel NSThread - cocoa/mysql database search... (From: Sparta <email@hidden>)
 >Re: Cancel NSThread - cocoa/mysql database search... (From: Bill Bumgarner <email@hidden>)
 >Re: Cancel NSThread - cocoa/mysql database search... (From: spartan g <email@hidden>)

  • Prev by Date: Re: NSApplication and command line args
  • Next by Date: Re: AppleEvents and modal dialogs
  • Previous by thread: Re: Cancel NSThread - cocoa/mysql database search...
  • Next by thread: Disabling check box cells
  • Index(es):
    • Date
    • Thread