11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.infoCHAPTER 28 • MYSQL STORAGE ENGINES AND DATA TYPESmight make sense to convert the table to MyISAM and re-create the necessary indexes. See the “StorageEngine FAQ” later in this chapter for information about how to convert between engines.CSVIntroduced in <strong>MySQL</strong> version 4.1.4 (available on Windows as of version 5.1), the CSV storage enginestores table data in a comma-separated format similar to that supported by many applications, such asOpenOffice and Microsoft Office.Although you access and manipulate CSV tables like any another table type, MyISAM for example,CSV tables are actually text files. This has an interesting implication in that you can actually copy anexisting CSV file over the corresponding data file (labeled with a .csv extension) found in <strong>MySQL</strong>’sdesignated data folder. Also, given CSV files’ particular format, it’s not possible to take advantage oftypical database features such as indexes.EXAMPLEBecause <strong>MySQL</strong>’s source code is freely available, you’re free to modify it, provided that you abide by theterms of its respective licenses. Realizing that developers might wish to create new storage engines,<strong>MySQL</strong> offers the EXAMPLE storage engine as a basic template for understanding how these engines arecreated.BLACKHOLEAvailable as of <strong>MySQL</strong> 4.1.11, the BLACKHOLE storage engine operates just like the MyISAM engineexcept that it won’t store any data. You might use this engine to gauge the overhead incurred by loggingbecause it’s still possible to log the queries even though data will not be stored.■ Tip The BLACKHOLE storage engine isn’t enabled by default, so you need to include the option --withblackhole-storage-engineat configuration time to use it.Storage Engine FAQThere is often a bit of confusion surrounding various issues pertinent to storage engines. Thus, thissection is devoted to addressing frequently asked questions about storage engines.Which Storage Engines Are Available on My Server?To determine which engines are available to your <strong>MySQL</strong> server, execute the following command:mysql>SHOW ENGINES;535

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!