Some rephrasing, based on suggestions by Egor.

parent 7467f918
...@@ -3187,9 +3187,10 @@ This can be handled much more efficiently by using an ...@@ -3187,9 +3187,10 @@ This can be handled much more efficiently by using an
@cindex rows, locking @cindex rows, locking
@cindex locking, row-level @cindex locking, row-level
Generally, you can code around row-level locking. Some cases really You can generally code around row-level locking. Some situations really
need it, but they are very few. For instance, you can use a flag need it, but they are very few. @code{InnoDB} tables support row-level
column in the table and do something like this: locking. With MyISAM, you can use a flag column in the table and do
something like the following:
@example @example
UPDATE tbl_name SET row_flag=1 WHERE id=ID; UPDATE tbl_name SET row_flag=1 WHERE id=ID;
...@@ -55410,22 +55411,20 @@ In MySQL, common tags to print (with the @code{d} option) are: ...@@ -55410,22 +55411,20 @@ In MySQL, common tags to print (with the @code{d} option) are:
@cindex methods, locking @cindex methods, locking
Currently MySQL only supports table locking for Currently MySQL only supports table locking for
@code{ISAM}/@code{MyISAM} and @code{HEAP} tables. @code{ISAM}/@code{MyISAM} and @code{HEAP} tables,
@code{InnoDB} tables use row level locking, page-level locking for @code{BDB} tables and
and @code{BDB} tables page level locking. @xref{Internal locking}. row-level locking for @code{InnoDB} tables.
With @code{MyISAM} @xref{Internal locking}.
tables one can freely mix @code{INSERT} and @code{SELECT} without locks With @code{MyISAM} tables one can freely mix @code{INSERT} and
(@code{Versioning}). @code{SELECT} without locks (@code{Versioning}).
Starting in version 3.23.33, you can analyse the table lock contention Starting in version 3.23.33, you can analyse the table lock contention
on your system by checking @code{Table_locks_waited} and on your system by checking @code{Table_locks_waited} and
@code{Table_locks_immediate} environment variables. @code{Table_locks_immediate} environment variables.
Some database users claim that MySQL cannot support near the To decide if you want to use a table type with row-level locking,
number of concurrent users because it lacks row-level locking. This you will want to look at what the application does and what the
may be true for some specific applications, but is not generally select/update pattern of the data is.
true. As always this depends totally on what the application does and what
is the access/update pattern of the data.
Pros for row locking: Pros for row locking:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment