{"id":10417,"date":"2013-12-24T11:00:02","date_gmt":"2013-12-24T02:00:02","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=10417"},"modified":"2019-05-13T20:51:15","modified_gmt":"2019-05-13T11:51:15","slug":"post10417","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2013\/12\/10417\/","title":{"rendered":"\u904e\u53bb\u3092\u3075\u308a\u8fd4\u308b\u305f\u3081\u306e\u3057\u304f\u307f (\u4e3b\u306b MySQL)"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001\u3044\u3061\u3044 (<a href=\"https:\/\/twitter.com\/ichii386\">@ichii386<\/a>) \u3067\u3059\u3002 <a href=\"http:\/\/labs.gree.jp\/blog\/2013\/11\/8799\/\">GREE Advent Calendar 2013<\/a> \u306e 24 \u65e5\u76ee\u3067\u3059\u3002<\/p>\n<p>\u3082\u3046\u30af\u30ea\u30b9\u30de\u30b9\u3067\u3059\u306d\u3002\u3082\u3057\u304b\u3057\u305f\u3089\u30d7\u30ec\u30bc\u30f3\u30c8\u3092\u8cb7\u308f\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u306e\u306b\u4f55\u3082\u6e96\u5099\u3057\u3066\u306a\u304f\u3066\u3001\u4eca\u65e5\u306f\u4ed5\u4e8b\u7d42\u308f\u3063\u305f\u3089\u6025\u3044\u3067\u8cb7\u3044\u306b\u884c\u304b\u306a\u304d\u3083\u3001\u306a\u3093\u3066\u7126\u3063\u3066\u3044\u308b\u4eba\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>\u53bb\u5e74\u306e\u30af\u30ea\u30b9\u30de\u30b9\u306f?<\/h2>\n<p>\u53bb\u5e74\u306f\u4f55\u8cb7\u3063\u305f\u3093\u3060\u3063\u305f\u304b\u306a\u3001\u3068\u601d\u3044\u8fd4\u3057\u3001<\/p>\n<ul>\n<li>20\u65e5\u306b\u7d66\u6599\u3068\u30dc\u30fc\u30ca\u30b9\u304c\u51fa\u305f\u306e\u3067\u3001\u4e88\u7b97\u306f\u3044\u304f\u3089\u304f\u3089\u3044\u3060\u3063\u305f<\/li>\n<li>\u76f8\u624b\u306f\u3061\u3087\u3046\u3069\u5f15\u3063\u8d8a\u3057\u305f\u306e\u3067\u3001\u90e8\u5c4b\u306b\u30e2\u30ce\u304c\u5c11\u306a\u304b\u3063\u305f<\/li>\n<\/ul>\n<p>\u306a\u3093\u3066\u3068\u3053\u304b\u3089\u300c\u3042\u30fc\u3001\u30da\u30f3\u30c0\u30f3\u30c8\u30e9\u30a4\u30c8\u3092\u30d7\u30ec\u30bc\u30f3\u30c8\u3057\u305f\u3093\u3060\u3063\u305f\u306a\u300d\u3068\u304b\u601d\u3044\u51fa\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u53bb\u5e74\u306f\u3061\u3087\u3063\u3068\u9ad8\u304b\u3063\u305f\u5272\u306b\u3042\u307e\u308a\u559c\u3093\u3067\u3082\u3089\u3048\u306a\u304b\u3063\u305f\u3057\u3001\u4eca\u5e74\u306f\u30dc\u30fc\u30ca\u30b9\u304c\u6e1b\u3063\u305f\u306e\u3067\u3067\u304d\u305f\u3089\u4e88\u7b97\u306f\u6e1b\u3089\u3057\u305f\u3044\u3067\u3059\u3002(\u203b\u5b8c\u5168\u306b\u67b6\u7a7a\u306e\u8a71\u306a\u3093\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044)<\/p>\n<p>\u4eca\u5e74\u3092\u6539\u5584\u3059\u308b\u305f\u3081\u306b\u3082\u3001\u307e\u305a\u306f\u53bb\u5e74\u3092\u3075\u308a\u8fd4\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u30d7\u30ec\u30bc\u30f3\u30c8\u3092\u6c7a\u3081\u308b\u306b\u306f\u4e88\u7b97\u3068\u3044\u3046\u6307\u6a19\u304c\u3042\u308a\u3001\u305d\u308c\u3092\u8a08\u7b97\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u518d\u5b9f\u884c\u3059\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<h2>\u904e\u53bb\u3092\u3075\u308a\u8fd4\u308b\u305f\u3081\u306e\u8981\u4ef6<\/h2>\n<p>\u3053\u306e\u624b\u306e\u96c6\u8a08\u30d7\u30ed\u30b0\u30e9\u30e0 (\u3082\u3057\u304f\u306f\u30d0\u30c3\u30c1\u51e6\u7406) \u306f<strong>\u3044\u3064\u518d\u5b9f\u884c\u3057\u3066\u3082\u540c\u3058\u7d50\u679c\u306b\u306a\u308b<\/strong>\u3053\u3068\u304c\u671f\u5f85\u3055\u308c\u307e\u3059\u3002\u3067\u306a\u3044\u3068\u53bb\u5e74\u306e\u30d7\u30ec\u30bc\u30f3\u30c8\u3092\u6c7a\u3081\u305f\u7d4c\u7def\u304c\u308f\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u81ea\u4f53\u306f\u30b3\u30fc\u30c9\u30ec\u30d9\u30eb\u3067\u540c\u3058\u306a\u3089\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u4ed5\u69d8\u5909\u66f4\u3068\u3068\u3082\u306b\u8a08\u7b97\u306b\u5229\u7528\u3057\u3066\u3044\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u4ed5\u69d8\u5909\u66f4\u304c\u3042\u308a\u305d\u3046\u306a\u3082\u306e\u306f\u3001\u30b3\u30fc\u30c9\u306b\u4efb\u305b\u305a\u30c7\u30fc\u30bf\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3042\u307e\u308a\u3044\u3044\u4f8b\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30a2\u30af\u30bb\u30b9\u5143 IP \u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30a2\u30af\u30bb\u30b9\u5143\u5730\u57df\u3092\u6c7a\u3081\u308b\u3088\u3046\u306a\u5834\u5408\u304c\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u76f4\u63a5\u5229\u7528\u3059\u308b\u30c7\u30fc\u30bf\u306b\u3064\u3044\u3066\u3001\u3053\u3053\u3067\u306f\u4ee5\u4e0b\u306e 2 \u7a2e\u985e\u306b\u5206\u985e\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<br \/>\n- \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30ed\u30b0\u3084\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u306e\u3088\u3046\u306a\u3001\u306a\u3093\u3089\u304b\u306e action \u3092\u8868\u3059\u30c7\u30fc\u30bf<br \/>\n- \u30e6\u30fc\u30b6\u5c5e\u6027\u306e\u3088\u3046\u306a\u3001\u306a\u3093\u3089\u304b\u306e property \u3092\u8868\u3059\u30c7\u30fc\u30bf<\/p>\n<p>\u524d\u8005\u306b\u3064\u3044\u3066\u306f\u3088\u304f\u3042\u308b\u8a71\u3057\u3067\u3001\u9069\u5f53\u306a\u30d5\u30a1\u30a4\u30eb\u306b\u3067\u3082\u66f8\u3044\u3066\u7f6e\u3044\u3066\u304a\u3051\u3070\u826f\u3044\u3067\u3059\u3002\u53bb\u5e74\u306e\u30d0\u30c3\u30c1\u306f\u53bb\u5e74\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u3080\u3001\u3068\u3002<\/p>\n<p>\u5f8c\u8005\u304c\u30af\u30bb\u30e2\u30ce\u3067\u3001\u591a\u304f\u306e\u5834\u5408 property \u306f MySQL \u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u307e\u307e\u3067\u306f1\u5e74\u524d\u306e\u30d0\u30c3\u30c1\u306e\u518d\u5b9f\u884c\u3092\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u3067\u8a08\u7b97\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u5fc5\u8981\u306a\u306e\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3042\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u3042\u308b\u30ab\u30e9\u30e0\u306e<strong>\u305d\u306e\u5f53\u6642\u3067\u306e\u5024<\/strong>\u306a\u306e\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3069\u3046\u3084\u3063\u3066\u904e\u53bb\u306e property \u306a\u30c7\u30fc\u30bf\u3092\u6b8b\u3059\u304b\u3092\u8003\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u524d\u63d0\u3068\u3057\u3066<\/h2>\n<p>\u672c\u8cea\u7684\u306b\u306f\u3001\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3059\u3079\u3066\u306e\u6642\u70b9\u3067\u306e\u5024\u3092\u3069\u3053\u304b\u306b\u4fdd\u5b58\u3057\u3066\u304a\u3051\u3070\u6e08\u3080\u8a71\u3067\u3059\u3002\u3057\u304b\u3057\u30ca\u30a4\u30fc\u30d6\u306b\u306f\u7a7a\u9593\u8a08\u7b97\u91cf (\u4e00\u822c\u7684\u306b\u306f\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf) \u306e\u610f\u5473\u3067\u52b9\u7387\u304c\u60aa\u304f\u3001\u73fe\u5b9f\u7684\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h4>a. \u30c7\u30fc\u30bf\u306e\u7b26\u53f7\u5316\u3092\u5909\u3048\u308b\/\u5727\u7e2e\u3059\u308b<\/h4>\n<p>\u4e00\u822c\u8ad6\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u3092\u524a\u6e1b\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u30d0\u30a4\u30ca\u30ea\u306b\u5909\u63db\u3059\u308b<\/li>\n<li>\u77ed\u3044\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306e\u5727\u7e2e<br \/>\n-- \u5358\u7d14\u306b gzip \u306e\u3088\u3046\u306a\u6c4e\u7528\u7684\u306a\u5727\u7e2e\u3092\u3059\u308b\u3002\u305f\u3060\u3057\u7a7a\u9593\u8a08\u7b97\u91cf\u3092\u6642\u9593\u8a08\u7b97\u91cf\u306b\u79fb\u8ee2\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u30d0\u30e9\u30f3\u30b9\u306f\u5fc5\u8981<\/li>\n<li>\u9577\u3044\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306e\u5727\u7e2e<br \/>\n-- \u3042\u308b property \u306e\u53d6\u308a\u3046\u308b\u5024\u3092\u7db2\u7f85\u3057\u3066 enum \u578b\u306b\u5909\u63db\u3059\u308b\u306a\u3069<\/li>\n<\/ul>\n<h4>b. \u7c92\u5ea6\u30921\u65e5\u5358\u4f4d\u306b\u3059\u308b<\/h4>\n<p>\u3059\u3079\u3066\u306e\u6642\u70b9\u3067\u306f\u306a\u304f\u3001<strong>1\u65e5\u5358\u4f4d\u3067\u4fdd\u5b58\u3067\u304d\u308c\u3070\u826f\u3044<\/strong>\u3068\u6c7a\u3081\u3066\u3057\u307e\u3048\u3070\u3060\u3044\u3076\u91cf\u304c\u6e1b\u308a\u307e\u3059\u3002<\/p>\n<p>\u6ce8\u610f\u70b9\u3068\u3057\u3066\u306f\u30011\u65e5\u306e\u9593\u306b\u4f55\u5ea6\u3082\u5909\u308f\u308b property \u306b\u5bfe\u3057\u3066\u300c\u3053\u306e\u65e5\u306e\u3053\u306e\u5024\u306f\u3053\u308c\u3060\uff01\u300d\u3068\u6c7a\u3081\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u53bb\u5e74\u306e\u30af\u30ea\u30b9\u30de\u30b9\u306f\u96e8\u304c\u591c\u66f4\u3051\u904e\u304e\u306b\u96ea\u306b\u5909\u308f\u3063\u305f\u3068\u3057\u3066\u3001\u3053\u306e\u65e5\u306e\u5929\u6c17\u3092\u96ea\u3068\u6c7a\u3081\u308b\u3088\u3046\u306a\u30ed\u30b8\u30c3\u30af\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u3055\u3082\u306a\u3044\u3068\u3001\u30af\u30ea\u30b9\u30de\u30b9\u3092\u96e8\u306e\u65e5\u3068\u96ea\u306e\u65e5\u306b\u30c0\u30d6\u30eb\u30ab\u30a6\u30f3\u30c8\u3057\u306612\u6708\u306e\u5408\u8a08\u65e5\u6570\u304c31\u3092\u8d85\u3048\u3066\u3057\u307e\u3046\u554f\u984c\u304c\u8d77\u304d\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h2>MySQL \u306e\u4e2d\u3067\u904e\u53bb\u3092\u3075\u308a\u8fd4\u308b<\/h2>\n<h4>a. \u6bce\u65e5\u30c7\u30fc\u30bf\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304f<\/h4>\n<p>\u7c92\u5ea6\u30921\u65e5\u306b\u8a2d\u5b9a\u3057\u305f\u4e0a\u3067\u3001\u3042\u304f\u307e\u3067\u30ca\u30a4\u30fc\u30d6\u306b\u3084\u308b\u306a\u3089\u3070\u4ee5\u4e0b\u304c\u3042\u308a\u307e\u3059\u3002\u304a\u305d\u3089\u304f\u591a\u304f\u306e\u65b9\u304c\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u76ee\u7684\u306b\u540c\u69d8\u306e\u3053\u3068\u3092\u3057\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>mysqldump \u3057\u3066\u3069\u3053\u304b\u306b\u4fdd\u5b58\u3057\u3066\u304a\u304f<\/li>\n<li>MySQL \u306e\u30c7\u30fc\u30bf\u304c\u5165\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u305d\u306e\u307e\u307e\u30b3\u30d4\u30fc\u3059\u308b<\/li>\n<\/ul>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u306f\u3042\u304f\u307e\u3067<strong>\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306b\u3057\u304b\u306a\u308a\u307e\u305b\u3093<\/strong>\u3002\u5f53\u7136\u65e5\u6570\u5206\u306e\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u5fc5\u8981\u3067\u3059\u3057\u3001\u305d\u306e\u65e5\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u3080\u305f\u3081\u306b\u306f MySQL \u3092\u8d77\u52d5\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\u53ef\u7528\u6027\u3092\u6c42\u3081\u308b\u306a\u3089\u3070\u65e5\u6570\u5206\u3060\u3051 TCP\/IP \u306e\u610f\u5473\u3067\u8cc7\u6e90 (\u30a2\u30c9\u30ec\u30b9\u3082\u3057\u304f\u306f\u30dd\u30fc\u30c8\u756a\u53f7) \u3092\u4e88\u7d04\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>b. binlog, relaylog \u3092\u898b\u308b<\/h4>\n<p>MySQL \u306e\u5834\u5408 replication \u306e\u4ed5\u7d44\u307f\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001 binlog \u3082\u3057\u304f\u306f slave \u3067\u306e relaylog \u306b\u3059\u3079\u3066\u306e\u30af\u30a8\u30ea\u30fc\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3042\u304f\u307e\u3067 MySQL \u304c\u5185\u90e8\u3067\u4f7f\u3046\u305f\u3081\u306e\u3082\u306e\u306a\u306e\u3067\u3001\u3053\u308c\u3092\u30d0\u30c3\u30c1\u51e6\u7406\u304b\u3089\u76f4\u63a5\u53c2\u7167\u3059\u308b\u306e\u306f\u73fe\u5b9f\u7684\u3067\u306f\u306a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u300c\u5024\u30921\u3060\u3051\u5897\u3084\u3057\u3066\u306d\u300d\u3068\u66f8\u3044\u3066\u3042\u308b\u3060\u3051\u3067\u3001\u7d50\u5c40\u3044\u304f\u3064\u306b\u306a\u308b\u306e\u304b\u306f\u30af\u30a8\u30ea\u30fc\u304b\u3089\u306f\u5206\u304b\u3089\u306a\u3044\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4>c. trigger \u3067\u4fdd\u5b58\u3059\u308b<\/h4>\n<p>\u30af\u30a8\u30ea\u30fc\u306b\u3088\u308b\u30c7\u30fc\u30bf\u66f4\u65b0\u306e\u5dee\u5206\u3060\u3051\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b trigger \u3092\u66f8\u304d\u3001\u9069\u5f53\u306a slave \u306b\u4ed5\u8fbc\u3080\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4ed5\u7d44\u307f\u3092\u4f7f\u3063\u3066\u304a\u308a\u3001\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u6700\u3082\u7d30\u304b\u3044\u7c92\u5ea6\u3067\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u3001\u7c92\u5ea61\u65e5\u3092\u5b9f\u73fe\u3059\u308b\u306e\u306f\u4e00\u822c\u306b\u306f\u56f0\u96e3\u3067\u3059\u3002<\/p>\n<h2>MySQL \u306e\u5916\u3067\u904e\u53bb\u3092\u3075\u308a\u8fd4\u308b<\/h2>\n<p>trigger \u307f\u305f\u304f\u5dee\u5206\u3060\u3051\u3092\u6b8b\u3057\u305f\u3044\u304c\u3001\u7c92\u5ea6\u306f1\u65e5\u306b\u3057\u305f\u3044\u3002\u3053\u308c\u3092 MySQL \u306e\u5916\u304b\u3089\u5b9f\u73fe\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u307e\u3059\u3002<\/p>\n<h4>a. git \u3067\u4fdd\u5b58\u3059\u308b (\u30cd\u30bf)<\/h4>\n<p>MySQL \u3067 engine=CSV \u3068\u3057\u3066 git add \u3057\u3001 transaction \u306e\u305f\u3073\u306b git ci \u3057\u3066\u3057\u307e\u3046\u3001\u3068\u3044\u3046\u306e\u306f\u3069\u3046\u3067\u3057\u3087\u3046? \u539f\u7406\u7684\u306b\u306f\u66f4\u65b0 hunk \u3076\u3093\u3060\u3051\u306e\u5bb9\u91cf\u3067\u6e08\u307f\u307e\u3059\u3057\u30011\u65e5\u5206\u306e diff \u3092\u307e\u3068\u3081\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u2026\u304c\u3001 git \u306f\u305d\u3046\u3044\u3046\u305f\u3081\u306e\u30e2\u30ce\u3058\u3083\u306a\u3044\u3093\u3067\u3001\u5b9f\u7528\u7684\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002(\u8ab0\u304b\u3084\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff57)<\/p>\n<h4>b. filesystem \u3067 snapshot \u3092\u53d6\u308b<\/h4>\n<p>\u66f4\u65b0\u524d\u3068\u66f4\u65b0\u5f8c\u306e\u30c7\u30fc\u30bf\u304c\u5171\u5b58\u3059\u308b\u3068\u8a00\u3048\u3070 Copy-On-Write (COW) \u3067\u3059\u3088\u306d\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001 COW \u306a\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b\u3001\u3068\u3044\u3046\u306e\u304c\u6700\u5f8c\u306b\u6319\u3052\u308b\u65b9\u91dd\u3067\u3059\u3002<\/p>\n<p>\u5f53\u7136\u306a\u304c\u3089\u3053\u306e\u65b9\u91dd\u306b\u3082\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059<br \/>\n- \u30e1\u30ea\u30c3\u30c8<br \/>\n-- \u4efb\u610f\u306e (\u6642\u7cfb\u5217\u306e) \u7c92\u5ea6\u3067 snapshot \u3092\u4f5c\u6210\u3067\u304d\u308b<br \/>\n-- \u5dee\u5206\u306e\u307f\u306e\u5bb9\u91cf\u3067 snapshot \u3092\u7dad\u6301\u3067\u304d\u308b<br \/>\n-- snapshot \u3092\u76f4\u63a5\u8aad\u3080\u3053\u3068\u304c\u3067\u304d\u308b<br \/>\n- \u30c7\u30e1\u30ea\u30c3\u30c8<br \/>\n-- filesystem \u30ec\u30a4\u30e4\u3067\u306e snapshot \u3092 MySQL \u304c\u7406\u89e3\u3067\u304d\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044<\/p>\n<p>\u904b\u306e\u826f\u3044\u3053\u3068\u306b MySQL \u306b\u306f MyISAM \u3068\u3044\u3046\u30b7\u30f3\u30d7\u30eb\u306a engine \u304c\u3042\u308a\u3001\u30c6\u30fc\u30d6\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u3068\u304d\u306b\u5358\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308c\u3070\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u3086\u3048 MyISAM \u3092\u4f7f\u3048\u308b\u72b6\u6cc1\u3067\u3042\u308c\u3070\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u56de\u907f\u3067\u304d\u3001\u3055\u3089\u306b\u53ef\u7528\u6027\u306b\u3064\u3044\u3066\u3082\u540c\u3058 MySQL \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u304b\u3089\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u4ed5\u8fbc\u3080\u3053\u3068\u3082\u3067\u304d\u307e\u3059 (\u8a73\u7d30\u306f\u3053\u3053\u3067\u306f\u5272\u611b\u3057\u307e\u3059)\u3002<\/p>\n<p>COW \u306a\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u306f <a href=\"http:\/\/en.wikipedia.org\/wiki\/ZFS\">ZFS<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Btrfs\">Brtfs<\/a> \u306e\u307b\u304b\u3001 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Ext3cow\">ext3cow<\/a>, NetApp \u793e\u306e <a href=\"http:\/\/en.wikipedia.org\/wiki\/Write_Anywhere_File_Layout\">WAFL (Write Anywhere File Layout)<\/a>, Microsoft \u793e\u304c Windows Server \u5411\u3051\u306b\u958b\u767a\u3057\u3066\u3044\u308b <a href=\"http:\/\/en.wikipedia.org\/wiki\/ReFS\">ReFS<\/a> \u306a\u3069\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4e0a\u3067\u76f4\u63a5 MySQL \u304c\u52d5\u304f\u3053\u3068\u304c\u6761\u4ef6\u306b\u306a\u308b\u306e\u3067\u5236\u7d04\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u5b9f\u969b\u306b\u5f0a\u793e\u5185\u3067\u306f ZFS \u3092\u4f7f\u3063\u3066\u3053\u306e\u4ed5\u7d44\u307f\u304c\u52d5\u3044\u3066\u3044\u307e\u3059\u3002\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u4f5c\u6210\u306f\u4e00\u77ac\u3001\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u306b\u3057\u3066 <strong>100 \u500d\u4ee5\u4e0a<\/strong>\u306e\u524a\u6e1b\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4ee5\u4e0a\u30c0\u30e9\u30c0\u30e9\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u307e\u3068\u3081\u3002<\/p>\n<ul>\n<li><strong>\u96c6\u8a08\u30d0\u30c3\u30c1\u51e6\u7406\u306f\u3044\u3064\u518d\u5b9f\u884c\u3057\u3066\u3082\u52d5\u304f\u3088\u3046\u306b\u3059\u3079\u3057<\/strong><br \/>\n-- \u3082\u3063\u3068\u8a00\u3046\u306a\u3089\u3001(\u6700\u8fd1\u3061\u3087\u3063\u3068\u6d41\u884c\u3063\u3066\u308b\u307d\u3044\u8a00\u8449\u3092\u501f\u308a\u3066) \u51aa\u7b49\u3067\u3042\u308b\u3079\u3057<\/li>\n<li><strong>\u30c7\u30fc\u30bf\u306f\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3060\u3051\u3058\u3083\u306a\u3044\u3001\u65e5\u3005\u66f4\u65b0\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3082\u3075\u308a\u8fd4\u308b\u5fc5\u8981\u304c\u3042\u308b<\/strong><br \/>\n-- \u5b9f\u306f\u5909\u5316\u3057\u3046\u308b\u30c7\u30fc\u30bf\u304c\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306b\u6df7\u3058\u3063\u3066\u306a\u3044\u304b\u3092\u3088\u304f\u8003\u3048\u308b<\/li>\n<li><strong>\u5dee\u5206\u3092\u6b8b\u3059\u306a\u3089 COW<\/strong><br \/>\n-- \u3044\u308f\u3086\u308b\u5727\u7e2e\u3088\u308a\u3082\u3088\u3063\u307d\u3069\u5bb9\u91cf\u524a\u6e1b\u306b\u306a\u308b<\/li>\n<li><strong>MySQL (MyISAM), ZFS \u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u65e5\u3005\u306e\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u306f\u304b\u3093\u305f\u3093<\/strong><br \/>\n-- MyISAM \u304c\u30b7\u30f3\u30d7\u30eb\u3060\u304b\u3089\u3053\u305d\u53ef\u80fd<\/li>\n<\/ul>\n<p>1\u5e74\u524d\u3067\u3082\u4f55\u3082\u8003\u3048\u305a\u306b\u65e5\u4ed8\u3060\u3051\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3059\u308c\u3070\u3061\u3083\u3093\u3068\u52d5\u304f\u3001\u305d\u308c\u304c\u96c6\u8a08\u30d0\u30c3\u30c1\u306e\u7406\u60f3\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u660e\u65e5\u306f\u6700\u7d42\u65e5\u3001<a href=\"https:\/\/twitter.com\/masaki_fujimoto\">@masaki_fujimoto<\/a> \u306e\u8a18\u4e8b\u3067\u3059\u3002\u3088\u308d\u3057\u304f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001\u3044\u3061\u3044 (@ichii386) \u3067\u3059\u3002 GREE Advent Calendar 2013 \u306e 24 \u65e5\u76ee\u3067\u3059\u3002 \u3082\u3046\u30af\u30ea\u30b9\u30de\u30b9\u3067\u3059\u306d\u3002\u3082\u3057\u304b\u3057\u305f\u3089\u30d7\u30ec\u30bc\u30f3\u30c8\u3092\u8cb7\u308f\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u306e\u306b\u4f55\u3082\u6e96\u5099\u3057\u3066\u306a\u304f\u3066\u3001\u4eca\u65e5\u306f\u4ed5\u4e8b [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[54,17,65],"class_list":["post-10417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-advent-calendar","tag-mysql","tag-zfs"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=10417"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10417\/revisions"}],"predecessor-version":[{"id":18268,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10417\/revisions\/18268"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=10417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=10417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=10417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}