Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ソーシャルゲームDBの 危機回避

Ryosuke Suto
December 12, 2014

ソーシャルゲームDBの 危機回避

MySQL Casual Talks vol.7

Ryosuke Suto

December 12, 2014
Tweet

More Decks by Ryosuke Suto

Other Decks in Technology

Transcript

  1.  $ZCFS"HFOU *OD CREATE TABLE giftbox_new LIKE giftbox; INSERT INTO

    giftbox_new SELECT giftbox WHERE (status = 1 AND updated > ‘2014-11-07 00:00:00’) OR (status = 0); RENAME giftbox giftbox_bk, giftbox_new giftbox; DROP TABLE giftbox_bk;
  2.  $ZCFS"HFOU *OD %&-&5&ʹͯ͠஗Ԇճආ •  σʔλྔ͕ଟ͍ͱ%&-&5&Ͱ΋஗͘ͳΔ •  εϨʔϒˠϚελʔͷॱͰ࣮ߦͯ͠ճආ Slave> DELETE

    FROM masterdata; Master> DELETE FROM masterdata; Master> INSET INTO masterdata (hoge,fuga,…) VALUES (xxx,yyy,…); ʢུʣ