<< 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 5:  MySQL Optimisation 333 5  MySQL Optimisation Optimisation is a complicated task because it ultimately requires understanding of the whole system.  While it may be possible to do some local optimisations with small knowledge of your system or application, the more optimal you want your system to become the more you will have to know about it. This  chapter  will  try  to  explain  and  give  some  examples  of  di erent  ways  to  optimise MySQL. Remember, however, that there are always some (increasingly harder) additional ways to make the system even faster. 5.1  Optimisation Overview The most important part for getting a system fast is of course the basic design.  You also need to know what kinds of things your system will be doing, and what your bottlenecks are. The most common bottlenecks are:    Disk seeks.  It takes time for the disk to nd a piece of data.  With modern disks in 1999, the mean time for this is usually lower than 10ms, so we can in theory do about 100  seeks  a  second.   This  time  improves  slowly  with  new  disks  and  is  very  hard  to optimise for a single table.   The way to optimise this is to spread the data on more than one disk.    Disk reading/writing.   When the disk is at the correct position we need to read the data.  With modern disks in 1999, one disk delivers something like 10-20MB/s.  This is easier to optimise than seeks because you can read in parallel from multiple disks.    CPU cycles.  When we have the data in main memory (or if it already were there) we need to process it to get to our result.  Having small tables compared to the memory is the most common limiting factor.  But then, with small tables speed is usually not the problem.    Memory bandwidth.  When the CPU needs more data than can t in the CPU cache the main memory bandwidth becomes a bottleneck.  This is an uncommon bottleneck for most systems, but one should be aware of it. 5.1.1  MySQL Design Limitations/Tradeo s When using the MyISAM table handler, MySQL uses extremely fast table locking (multiple readers / single writers). The biggest problem with this table type is a if you have a mix of a steady stream of updates and slow selects on the same table.  If this is a problem with some tables, you can use another table type for these.  See Chapter 7 [Table types], page 494. MySQL can work with both transactional and not transactional tables.  To be able to work smoothly  with  not  transactional  tables  (which  can't  rollback  if  something  goes  wrong), MySQL has the following rules:
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • 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