Databases Reference
In-Depth Information
Plugins
Plugins are written in C or C++ and let you extend the functionality of the server
in many ways. They're very powerful, and we've written many UDFs and plugins
for various purposes when the problem is best solved inside the server in native
code.
Character sets
A character set is a mapping between byte values and characters, and a collation
is the sort order of the characters. Most people use either the latin1 (the default,
suitable for English and some European languages) or UTF-8 character sets. If you
use UTF-8, beware of temporary tables and buffers: the server allocates three bytes
per character, so you can use a lot of disk and memory space if you're not careful.
Be very careful to make character sets and character set configuration options
match, from the client-side connections all the way through, or you'll cause con-
versions that defeat indexing.
Full-text searching
Only MyISAM supports full-text indexes at the time of writing, though it looks
like InnoDB will offer this capability when MySQL 5.6 is released. MyISAM is
basically unusable for large-scale full-text searching due to locking and lack of
crash resilience, and we generally help people set up and use Sphinx instead.
XA transactions
Most people don't use XA transactions with MySQL. However, don't disable
innodb_support_xa unless you know what you are doing . It is not , as many people
think, unnecessary if you don't do explicit XA transactions. It is used for coordi-
nating InnoDB and the binary log so crash recovery will work correctly.
The query cache
The query cache prevents queries from being reexecuted if the stored result of an
exactly identical query is already cached. Our experience with the query cache in
high-load environments has been peppered with server lockups and stalls. If you
use the query cache, don't make it very large, and use it only if you know it's highly
beneficial. How can you know that? The best way is to use Percona Server's ex-
tended query logging facilities and a little math. Barring that, you can look at the
cache hit ratio (not always helpful), the select-to-insert ratio (also hard to interpret),
or the hit-to-insert ratio (a bit more meaningful). In the final analysis, the query
cache is convenient because it's transparent and doesn't require any additional
coding on your part, but if you need a highly efficient cache for high performance,
you're better off looking at memcached or another external solution. More on this
in Chapter 14 .
 
Search WWH ::




Custom Search