Using the Embedded InnoDB plugin I’m working on, you can use the
INNODB_STATUS table function in the data_dictionary, you can do
pretty neat things.
For example, we can see that each autocommit transaction causes
an fsync and if you insert multiple rows ina single
statement, you still only get 1 fsync:
drizzle> SELECT * FROM DATA_DICTIONARY.INNODB_STATUS
-> WHERE name="fsync_req_done";
+----------------+-------+
| NAME | VALUE |
+----------------+-------+
| fsync_req_done | 25 |
+----------------+-------+
1 row in set (0 sec)
drizzle> insert into t1 values (1);
Query OK, 1 row affected (0.05 sec)
drizzle> SELECT * FROM DATA_DICTIONARY.INNODB_STATUS WHERE name="fsync_req_done";
+----------------+-------+
| NAME | VALUE |
+----------------+-------+
| fsync_req_done | 26 |
+----------------+-------+
1 row in set (0 sec)
drizzle> insert into t1 values (1),(2),(3),(4);Query OK, 4 rows affected (0 …
[Read more]