<< 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 335 to disk).  Transaction databases in general are not very good at generating summary tables from log tables, as in this case row locking is almost useless. To get your application really  database-independent, you need to de ne an easy extendable interface through which you manipulate your data.  As C++ is available on most systems, it makes sense to use a C++ classes interface to the databases. If you use some speci c feature for some database (like the REPLACE command in MySQL), you should code a method for the other SQL servers to implement the same feature (but slower).  With MySQL you can use the /*! */ syntax to add MySQL-speci c keywords to a query.  The code inside /**/ will be treated as a comment (ignored) by most other SQL servers. If  high  performance  is  more  important  than  exactness,  as  in  some  web  applications,  it is  possibile  to  create  an  application  layer  that  caches  all  results  to  give  you  even  higher performance.  By letting old results 'expire' after a while, you can keep the cache reasonably fresh. This provides a method to handle high load spikes, in which case you can dynamically increase the cache and set the expire timeout higher until things get back to normal. In this case the table creation information should contain information of the initial size of the cache and how often the table should normally be refreshed. 5.1.3  What Have We Used MySQL For? During MySQL initial development,  the features of MySQL were made to t our largest customer.  They handle data warehousing for a couple of the biggest retailers in Sweden. From all stores, we get weekly summaries of all bonus card transactions, and we are expected to provide useful information for the store owners to help them nd how their advertisement campaigns are a ecting their customers. The data is quite huge (about 7 million summary transactions per month), and we have data for 4-10 years that we need to present to the users.  We got weekly requests from the customers that they want to get 'instant' access to new reports from this data. We solved this by storing all information per month in compressed 'transaction' tables.  We have a set of simple macros (script) that generates summary tables grouped by di erent criteria (product group, customer id, store ...)  from the transaction tables.  The reports are web pages that are dynamically generated by a small Perl script that parses a web page, executes the SQL statements in it, and inserts the results.  We would have used PHP or mod perl instead but they were not available at that time. For graphical data we wrote a simple tool in that can produce GIFs based on the result of a SQL query (with some processing of the result).  This is also dynamically executed from the Perl script that parses the HTML  les. In most cases a new report can simply be done by copying an existing script and modifying the SQL query in it.  In some cases, we will need to add more elds to an existing summary table or generate a new one, but this is also quite simple, as we keep all transactions tables on disk.  (Currently we have at least 50G of transactions tables and 200G of other customer data.) We  also  let  our  customers  access  the  summary  tables  directly  with  ODBC  so  that  the advanced users can themselves experiment with the data.
     

    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