select sum(val) from numbers;
Notę that any alphabetic values in the result set are turned into 0 by the cali to CAST (). When
using functions such as AVG () that depend on the number of rows in the result set, include WHERE
clauses to filter out any non-numeric values.
• If the innoDBcolumn you use as a key can be longer than 250 bytes, hash it to a value that is less
than 250 bytes.
• To use an existing table with the memcachedinterface, define an entry for it in the innodb_memcache. containerstable. To make that the table the default for all requests relayed
through memcached, specify the value default in the name column, then restart the MySQL server
to make that change take effect. If you are using multiple tables for different classes
of memcached
data, set up multiple entries in the innodb_memcache. containerstable with name values of your
choosing, then issue a memcachedrequest of the form get 00name or set 00name withinthe
application to switch the table used for subsequent requests through the
memcachedAPI.
For an example of using a table other than the predefined test .demo_testtable, see
Example 14.5, “Specifying the Table and Column Mapping for an InnoDB + memcached Application".
For the required layout and meaning of the columns in such a table, see Section
14.2.9.7, “Internals
of the InnoDBmemcached Plugin".
•To use multiple MySQL column values with memcachedkey/value pairs, in the innodb_memcache.containersentry associated with the MySQL table, specify in the
value_columnsfield several column names separated by comma, semicolon, space, or pipę
characters; for example, coll,col2#col3 or coli I col2 I col3.
Concatenate the column values into a single string using the pipę character as a separator, before
passing that string to memcached add or set calls. The string is unpacked automatically into the
various columns. Each get cali returns a single string with the column values, also delimited by the
pipę separator character. you unpack those values using the appropriate syntax
depending on your
applicationlanguage.