Table locks

Posted on 2012-09-20
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

Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
Question by:gudii9
    LVL 76

    Assisted Solution

    by:slightwv (䄆 Netminder)
    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:

    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?
    LVL 2

    Accepted Solution


    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.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now