<< 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

    248 MySQL Technical Reference for Version 4.0.3 For the moment,  OPTIMIZE TABLE  only works on  MyISAM  and  BDB  tables.  For  BDB  tables, OPTIMIZE TABLE is currently mapped to ANALYZE TABLE. See Section 4.5.2 [ANALYZE TABLE], page 248. You can get OPTIMIZE TABLE to work on other table types by starting mysqld with --skip- new or --safe-mode, but in this case OPTIMIZE TABLE is just mapped to ALTER TABLE. OPTIMIZE TABLE works the following way:    If the table has deleted or split rows, repair the table.    If the index pages are not sorted, sort them.    If  the  statistics  are  not  up  to  date  (and  the  repair  couldn't  be  done  by  sorting  the index), update them. OPTIMIZE TABLE for a MyISAM table is equivalent to running myisamchk --quick --check- only-changed --sort-index --analyze on the table. Note that the table is locked during the time OPTIMIZE TABLE is running! 4.5.2  ANALYZE TABLE Syntax ANALYZE TABLE tbl_name[,tbl_name...] Analyse and store the key distribution for the table.  During the analysis, the table is locked with a read lock.  This works on MyISAM and BDB tables. This is equivalent to running myisamchk -a on the table. MySQL uses the stored key distribution to decide in which order tables should be joined when one does a join on something else than a constant. The command returns a table with the following columns: Column Value Table Table name Op Always \analyze" Msg type One  of  status,  error,  info  or warning. Msg text The message. You  can  check  the  stored  key  distribution  with  the  SHOW INDEX  command.    See  Sec- tion 4.5.6.1 [SHOW DATABASE INFO], page 251. If the table hasn't changed since the last  ANALYZE TABLE  command, the table will not be analysed again. 4.5.3  FLUSH Syntax FLUSH flush_option [,flush_option] ... You should use the FLUSH command if you want to clear some of the internal caches MySQL uses.  To execute FLUSH, you must have the RELOAD privilege. flush_option can be any of the following:
     

    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