<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    Chapter 7:  MySQL Table Types 527 semaphore.  A big number of threads waiting for semaphores may be a result of disk I/O, or contention problems inside InnoDB. Contention can be due to heavy parallelism of queries, or problems in operating system thread scheduling.    Section  CURRENT  PENDING  FILE  I/O'S  lists  pending   le  I/O  requests.   A  large number of these indicates that the workload is disk I/O-bound.    Section  BUFFER  POOL  gives  you  statistics  on  pages  read  and  written.   You  can calculate from these numbers how many data le I/Os your queries are currently doing. 7.5.10  Implementation of Multi-versioning Since  InnoDB  is  a  multi-versioned  database,  it  must  keep  information  of  old  versions  of rows in the tablespace.   This information is stored in a data structure we call a rollback segment after an analogous data structure in Oracle. InnoDB internally adds two elds to each row stored in the database.  A 6-byte eld tells the transaction identi er for the last transaction which inserted or updated the row.  Also a deletion is internally treated as an update where a special bit in the row is set to mark it as deleted.  Each row also contains a 7-byte eld called the roll pointer.  The roll pointer points to an undo log record written to the rollback segment.  If the row was updated, then the undo log record contains the information necessary to rebuild the content of the row before it was updated. InnoDB uses the information in the rollback segment to perform the undo operations needed in a transaction rollback.  It also uses the information to build earlier versions of a row for a consistent read. Undo logs in the rollback segment are divided into insert and update undo logs.  Insert undo logs are only needed in transaction rollback and can be discarded as soon as the transaction commits.  Update undo logs are used also in consistent reads, and they can be discarded only after there is no transaction present for which InnoDB has assigned a snapshot that in a consistent read could need the information in the update undo log to build an earlier version of a database row. You must remember to commit your transactions regularly, also those transactions which only issue consistent reads.  Otherwise InnoDB cannot discard data from the update undo logs, and the rollback segment may grow too big, lling up your tablespace. The physical size of an undo log record in the rollback segment is typically smaller than the corresponding inserted or updated row.  You can use this information to calculate the space need for your rollback segment. In our multi-versioning scheme a row is not physically removed from the database immedi- ately when you delete it with an SQL statement. Only when InnoDB can discard the update undo log record written for the deletion, it can also physically remove the corresponding row and its index records from the database.  This removal operation is called a purge, and it is quite fast, usually taking the same order of time as the SQL statement which did the deletion. 7.5.11  Table and Index Structures
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    MERCHANT ACCOUNTS
    DEDICATED SERVERS
    E-COMMERCE HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN
    REGISTRATION
    MANAGE
    YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    Corporate Info
    ABOUT US
    OUR NETWORK
    CONTACT US
    SITE MAP
    Copyright © 2002 Dyntex Group, Inc. All Rights Reserved
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide