<< 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 519 copying all the relevant les, which we already listed in the previous section on backing up a database.  If the oating-point formats on the machines are di erent but you have not used FLOAT or DOUBLE data types in your tables then the procedure is the same:  just copy the relevant les.  If the formats are di erent and your tables contain oating-point data, you have to use `mysqldump' and `mysqlimport' to move those tables. A performance tip is to switch o the auto commit when you import data into your database, assuming  your  tablespace  has  enough  space  for  the  big  rollback  segment  the  big  import transaction will generate.  Do the commit only after importing a whole table or a segment of a table. 7.5.8  InnoDB Transaction Model In the InnoDB transaction model  the goal has been to combine the best  properties  of a multi-versioning database to traditional two-phase locking.   InnoDB does locking on row level  and  runs  queries  by  default  as  non-locking  consistent  reads,  in  the  style  of  Oracle. The lock table in InnoDB is stored so space-eciently that lock escalation is not needed: typically several users are allowed to lock every row in the database, or any random subset of the rows, without InnoDB running out of memory. In InnoDB all user activity happens inside transactions.  If the auto-commit mode is used in MySQL, then each SQL statement will form a single transaction.  If the auto commit mode is switched o , then we can think that a user always has a transaction open.  If he issues the SQL  COMMIT  or  ROLLBACK  statement,  that ends the current transaction,  and a new starts.  Both statements will release all InnoDB locks that were set during the current transaction.  A COMMIT means that the changes made in the current transaction are made permanent and become visible to other users.  A ROLLBACK on the other hand cancels all modi cations made by the current transaction. 7.5.8.1  Consistent Read A  consistent  read  means  that  InnoDB  uses  its  multi-versioning  to  present  to  a  query  a snapshot  of  the  database  at  a  point  in  time.   The  query  will  see  the  changes  made  by exactly those transactions that committed before that point of time, and no changes made by later or uncommitted transactions.  The exception to this rule is that the query will see the changes made by the transaction itself which issues the query. When  a  transaction  issues  its   rst  consistent  read,  InnoDB  assigns  the  snapshot,  or  the point of time, which all consistent reads in the same transaction will use.  In the snapshot are  all  transactions  that  committed  before  assigning  the  snapshot.   Thus  the  consistent reads within the same transaction will also be consistent with respect to each other.  You can get a fresher snapshot for your queries by committing the current transaction and after that issuing new queries. Consistent  read  is  the  default  mode  in  which  InnoDB  processes  SELECT  statements.   A consistent read does not set any locks on the tables it accesses, and therefore other users are free to modify those tables at the same time a consistent read is being performed on the table.
     

    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