27.1. Performance Issues


To reduce the amount of disk space required by character sets for your MySQL installation and the amount of memory used by the server as it runs, don't select unneeded character sets when you configure MySQL. This requires that you compile MySQL from source rather than using a precompiled binary distribution.

To see which character sets are available, invoke the configure script with the --help option and examine the description for the --with-charset option.

 shell> ./configure --help ... --with-charset=CHARSET                         Default character set, use one of:                         binary                         armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257                         cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312                         gbk geostd8 greek hebrew hp8 keybcs2 koi8r koi8u                         latin1 latin2 latin5 latin7 macce macroman                         sjis swe7 tis620 ucs2 ujis utf8 ... 

To configure MySQL with support for a given set of character sets, invoke configure with a --with-charset option that specifies the default character set, and a --with-extra-charsets option that names any other character sets to include. The value of the latter option should be a comma-separated list of character set names. For example, to make latin1 the default, but include support for the utf8 and ucs2 Unicode character sets, run configure like this:

 shell> ./configure --with-charset=latin1 \            --with-extra-charsets=utf8,ucs2 

To see which character sets your server supports as it's currently configured, use the SHOW CHARACTER SET statement:

 mysql> SHOW CHARACTER SET; +----------+-----------------------------+---------------------+--------+ | Charset  | Description                 | Default collation   | Maxlen | +----------+-----------------------------+---------------------+--------+ | big5     | Big5 Traditional Chinese    | big5_chinese_ci     |      2 | | dec8     | DEC West European           | dec8_swedish_ci     |      1 | | cp850    | DOS West European           | cp850_general_ci    |      1 | | hp8      | HP West European            | hp8_english_ci      |      1 | | koi8r    | KOI8-R Relcom Russian       | koi8r_general_ci    |      1 | | latin1   | ISO 8859-1 West European    | latin1_swedish_ci   |      1 | | latin2   | ISO 8859-2 Central European | latin2_general_ci   |      1 | ... 



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net