{"id":1853,"date":"2010-03-16T15:59:19","date_gmt":"2010-03-16T05:59:19","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1853"},"modified":"2010-03-16T15:59:19","modified_gmt":"2010-03-16T05:59:19","slug":"embedded-innodb-innodb-status","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-innodb-status\/","title":{"rendered":"Embedded InnoDB: InnoDB Status"},"content":{"rendered":"<p>Using the Embedded InnoDB plugin I&#8217;m working on, you can use the INNODB_STATUS table function in the data_dictionary, you can do pretty neat things.<\/p>\n<p>For example, we can see that each autocommit transaction causes an fsync and if you insert multiple rows ina \u00c2\u00a0single statement, you still only get 1 fsync:<\/p>\n<pre>drizzle&gt; SELECT * FROM DATA_DICTIONARY.INNODB_STATUS\r\n    -&gt; WHERE name=\"fsync_req_done\";\r\n+----------------+-------+\r\n| NAME           | VALUE |\r\n+----------------+-------+\r\n| fsync_req_done |    25 |\r\n+----------------+-------+\r\n1 row in set (0 sec)\r\n\r\ndrizzle&gt; insert into t1 values (1);\r\nQuery OK, 1 row affected (0.05 sec)\r\n\r\ndrizzle&gt; SELECT * FROM DATA_DICTIONARY.INNODB_STATUS WHERE name=\"fsync_req_done\";\r\n+----------------+-------+\r\n| NAME           | VALUE |\r\n+----------------+-------+\r\n| fsync_req_done |    26 |\r\n+----------------+-------+\r\n1 row in set (0 sec)\r\n\r\ndrizzle&gt; insert into t1 values (1),(2),(3),(4);Query OK, 4 rows affected (0 sec)\r\nRecords: 4  Duplicates: 0  Warnings: 0\r\n\r\ndrizzle&gt; SELECT * FROM DATA_DICTIONARY.INNODB_STATUS WHERE name=\"fsync_req_done\";\r\n+----------------+-------+\r\n| NAME           | VALUE |\r\n+----------------+-------+\r\n| fsync_req_done |    27 |\r\n+----------------+-------+\r\n1 row in set (0 sec)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using the Embedded InnoDB plugin I&#8217;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 &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-innodb-status\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[75],"tags":[259,70,257,258],"class_list":["post-1853","post","type-post","status-publish","format-standard","hentry","category-drizzle-work-et-al","tag-data_dictionary","tag-drizzle","tag-innodb","tag-libinnodb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-tT","jetpack-related-posts":[{"id":1849,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/16\/embedded-innodb-querying-the-configuration\/","url_meta":{"origin":1853,"position":0},"title":"Embedded InnoDB: querying the configuration","author":"Stewart Smith","date":"2010-03-16","format":false,"excerpt":"I am rather excited about being able to do awesome things such as this to get the current configuration of your server: drizzle> SELECT NAME,VALUE -> FROM DATA_DICTIONARY.INNODB_CONFIGURATION -> WHERE NAME IN (\"data_file_path\", \"data_home_dir\"); +----------------+-------+ | NAME | VALUE | +----------------+-------+ | data_file_path | NULL | | data_home_dir | .\/\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1874,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/30\/storing-the-table-message-in-embedded-innodb\/","url_meta":{"origin":1853,"position":1},"title":"Storing the table message in Embedded InnoDB","author":"Stewart Smith","date":"2010-03-30","format":false,"excerpt":"One of the exciting things[1] about working on a storage engine in Drizzle is that you get to manage your own metadata. When the database engine you're writing the storage engine interface for has a pretty complete data dictionary (e.g. Embedded InnoDB) you could just directly use it. At some\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2223,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/12\/06\/replication-log-inside-innodb\/","url_meta":{"origin":1853,"position":2},"title":"Replication log inside InnoDB","author":"Stewart Smith","date":"2010-12-06","format":false,"excerpt":"The MySQL replication system has always had the replication log (\"binlog\") as a separate set of files on disk. Originally, this really didn't matter as, well, MyISAM wasn't transactional or crash safe so the binlog didn't need to be either. If you crashed on a busy write workload, your replication\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1903,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/04\/21\/storage-engine-api-write_row-create-select-and-ddl\/","url_meta":{"origin":1853,"position":3},"title":"Storage Engine API: write_row, CREATE SELECT and DDL","author":"Stewart Smith","date":"2010-04-21","format":false,"excerpt":"(this probably applies exactly the same for MySQL and Drizzle... but I'm just speaking about current Drizzle here) In my current merge request for the embedded-innodb\u00ef\u00bb\u00bf-create-select-transaction-arrgh branch (also see this specific revision), you'll notice an odd hoop that we have to jump through to make CREATE SELECT statements work with\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1383,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/02\/02\/row-id-in-mysql-and-drizzle-and-the-engines\/","url_meta":{"origin":1853,"position":4},"title":"row id in MySQL and Drizzle (and the engines)","author":"Stewart Smith","date":"2009-02-02","format":false,"excerpt":"Some database engines have a fundamental concept of a row id. The row id is everything you need to know to locate a row. Common uses include secondary indexes (key is what's indexed, value is rowid which you then use to lookup the row). One design is the InnoDB method\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1894,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/04\/16\/announcing-haildb\/","url_meta":{"origin":1853,"position":5},"title":"Announcing HailDB","author":"Stewart Smith","date":"2010-04-16","format":false,"excerpt":"I just announced our continuation of the Embedded InnoDB project under the name of HailDB. Check out the announcement over at http:\/\/www.haildb.com\/. HailDB is a relational database that is embeddable within applications. You embed\u00c2\u00a0HailDB by linking to a shared library and calling a clean and simple API.\u00c2\u00a0HailDB is a continuation\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=1853"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1853\/revisions"}],"predecessor-version":[{"id":1854,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1853\/revisions\/1854"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}