?
Solved

Table locks

Posted on 2012-09-20
2
Medium Priority
?
482 Views
Last Modified: 2012-10-01
I read about Table locks but not clear on this



For non-InnoDB storage engines, every
change is immediately saved to disk - not
suitable for multi-user environment where
transactional behavior is essential

Two types of table locks
> READ, WRITE


Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
2 Comments
 
LVL 78

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1000 total points
ID: 38420101
What isn't clear?  Table locks are a pretty detailed topic and probably not easily explained here.

The Oracle docs talk a lot about them:
http://docs.oracle.com/cd/E11882_01/server.112/e25789/consist.htm#CNCPT1342

To try to simplify locks:  Two people cannot update the same row at the same time so the first transaction that initiates the update must 'lock' the row to prevent others from updating it at the same time.

Once the first user commits or rolls back the transaction, this releases the lock and lets the next transaction proceed.

Since you mention InnoDB, are you wanting MySQL specific details?
0
 
LVL 2

Accepted Solution

by:
brijesh_chauhan earned 1000 total points
ID: 38424526
Hi,

Its A Very Huge Topic To Discuss But I Am Trying To Convey It In A Simple Manner.

Innodb Uses The Row-Level Locking Mechanism While MyISAM Uses The Table Level Locking.

In A Simple Case While A Has The Resource (Eg. Updating Something) And B Wants To Gain The Resource (Eg. Perform Any operation) Then B Must Have To Wait Until A Has Finish Its Job..

Difference Is In Innodb This will Happen At Row-Level while In MyISAM This Will Happen At Table Level.

Hope This Would Help.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question