Use indexes. Make sure your indexes are on the right side of the where clause ie.
SELECT col1,col2 from tablewithproperindexes where col3=const_index_lookup. Or you can use a dirty read as your transaction model to help out a TINY bit. -- DVP > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 8:09 PM > To: [EMAIL PROTECTED] > Subject: mySQL: Table locking problems when non-index keys used > > > Friends, > > Sorry to post this question again. I got a message saying that the > server couldn't transfer this message to some groups. Also I didn't get > any response to this question. > > > We are using mysql 4.0.17 with innodb option. In a query, when a WHERE > clause contains a non-indexed columns, it locks the entire table instead > of row lock. Is there any solution apart from building index on each > query key ? Is there a solution in any of the later versions ? > > With Best Regards, > Ravi > > > Confidentiality Notice > > The information contained in this electronic message and any attachments > to this message are intended > for the exclusive use of the addressee(s) and may contain confidential or > privileged information. If > you are not the intended recipient, please notify the sender at Wipro or > [EMAIL PROTECTED] immediately > and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]