If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Mysql table locked if doing select ???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-05, 07:01
eric_sato eric_sato is offline
Registered User
 
Join Date: Oct 2002
Location: 302489203
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 01-27-05, 12:18
ServerMetrics ServerMetrics is offline
Registered User
 
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)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On