<< 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 501    The rst time a table is updated in MySQL, a counter in the header of the index les is incremented.    The counter is not changed during further updates.    When the last instance of a table is closed (because of a  FLUSH  or because there isn't room in the table cache) the counter is decremented if the table has been updated at any point.    When you repair the table or check the table and it was okay, the counter is reset to 0.    To avoid problems with interaction with other processes that may do a check on the table, the counter is not decremented on close if it was 0. In other words, the only ways this can go out of sync are:    The MyISAM tables are copied without a LOCK and FLUSH TABLES.    MySQL has crashed between an update and the nal close.  (Note that the table may still be okay, as MySQL always issues writes for everything between each statement.)    Someone  has  done  a  myisamchk --repair  or  myisamchk --update-stateon  a  table that was in use by mysqld.    Many  mysqld  servers are using the table and one has done a  REPAIR  or  CHECK  of the table  while  it  was  in  use  by  another  server.   In  this  setup  the  CHECK  is  safe  to  do (even if you will get the warning from other servers), but  REPAIR  should be avoided as it currently replaces the data le with a new one, which is not signaled to the other servers. 7.2  MERGE Tables MERGE  tables are new in MySQL Version 3.23.25.  The code is still in gamma, but should be resonable stable. MERGE table (also known as a MRG_MyISAM table) is a collection of identical MyISAM tables that can be used as one.  You can only SELECTDELETE, and UPDATE from the collection of tables.  If you DROP the MERGE table, you are only dropping the MERGE speci cation. Note that DELETE FROM merge_table used without a WHERE will only clear the mapping for the table, not delete everything in the mapped tables.  (We plan to x this in 4.1). With identical tables we mean that all tables are created with identical column and key information.  You can't merge tables in which the columns are packed di erently, doesn't have exactly the same columns, or have the keys in di erent order.  However, some of the tables can be compressed with myisampack.  See Section 4.7.4 [myisampack], page 279. When you create a MERGE table, you will get a `.frm' table de nition le and a `.MRG' table list le.  The `.MRG' just contains a list of the index les (`.MYI' les) that should be used as one.  All used tables must be in the same database as the MERGE table itself. For the moment, you need to have SELECTUPDATE, and DELETE privileges on the tables you map to a MERGE table. MERGE  tables can help you solve the following problems:    Easily manage a set of log tables.  For example, you can put data from di erent months into separate les, compress some of them with myisampack, and then create a MERGE to use these as one.
     

    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