Hi, Try to have optimistic locking in the database server (row level locking a.k.a. innodb storage), et let your transactions managed by the server. Any line of code like "lock table" will generate a very bad web application performances.
You can add connection pooling if you want to manage total number of users. Best Regards -------------------- Mathias FATENE Hope that helps *This not an official mysql support answer -----Original Message----- From: Scott Klarenbach [mailto:[EMAIL PROTECTED] Sent: vendredi 29 avril 2005 20:28 To: My SQL Subject: Pessimistic Record Locking Hello, I'm using MySQL 5.0.3 Beta, and I'm hoping for some general tips/experience you guys may have had regarding optomistic vs pessimistic locking in a web app (PHP 5.0.3) I'm more of a windows programmer, and I've always implemented pessimistic over optomistic as it's much more professional and attractive to the end user. The problem as you know, is that web development makes pessimistic locking much more difficult, because of the user closing the browser, and a bunch of other factors I can't control. Question: which type of locking do you usually implement in your web apps, and do you do it at a DB level or in your application layer? Any thoughts on a custom locking scheme (ie, a lock table that is written to with a user id and record id and timestamp)? Other solutions/suggestions are greatly appreciated. Thanks in advance. Scott. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]