Benchmarks suggest that the
memcached plugin speeds up
DML operations (inserts,
updates, and deletes) more than it speeds up queries. You might
focus your initial development efforts on write-intensive
applications that are I/O-bound, and look for opportunities to
use MySQL for new kinds of write-intensive applications.
INSERT INTO t1 (key,val) VALUES (
some_value); SELECT val FROM t1 WHERE key =
some_key; UPDATE t1 SET val =
new_valueWHERE key =
some_key; UPDATE t1 SET val = val + x WHERE key =
some_key; DELETE FROM t1 WHERE key =
Single-row DML statements are the most straightforward kinds of statements to turn into
delete. When issued through the memcached interface, these operations are guaranteed to affect only 1 row because
keyis unique within the table.
In the preceding SQL examples,
t1refers to the table currently being used by the
InnoDBmemcached plugin based on the configuration settings in the
keyrefers to the column listed under
valrefers to the column listed under
TRUNCATE TABLE t1; DELETE FROM t1;
Corresponds to the
t1is configured as the table for memcached operations as in the previous step. Removes all the rows in the table.