Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    302489203
    Posts
    1

    Unanswered: Mysql table locked if doing select ???

    Hi all,
    I've a big table around 2 millions records (MyISAM version 4.1.7). If i do a query with with wildcard '%', and another process doing update on the same table. It will locked the table that caused by my query.
    My understanding select is doing read only right?
    Pls correct me if i'm wrong. How should i overcome this problem?
    Confused here.
    Cheers
    sato

  2. #2
    Join Date
    May 2004
    Posts
    45
    MySQL creates exclusive locks on writes/updates/deletes. Your select will have to wait until the update operation completes. Try using the UPDATE LOW PRIORITY statement which will not update until all active reads complete.
    Keith Brownlow
    ServerMetrics DB Monitoring (www.servermetrics.com)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •