Slide 1

Slide 1 text

.Z42-͔Β#JH2VFSZͷಉظΛ ࠩ෼ߋ৽ʹͨ͠Βഒߴ଎ʹͳͬͨ࿩ &NCVML.FFUVQ5PLZP VASILY,Inc. Ԙ㟒݈߂

Slide 2

Slide 2 text

Ԙ㟒݈߂ w ೥ʹ7"4*-:ʹ৽ଔೖࣾ w ීஈͷ͓࢓ࣄ͸3BJMTͰXFC"1*࡞ͬͨΓɺ4PMSͷϝϯςͨ͠Γɺ
 5BCMFBV#JH2VFSZͰμογϡϘʔυ࡞ͬͨΓ w &NCVML͸ࠓ೥ͷ݄ࠒʹ৮Γ࢝Ίͨ͹͔Γ 7"4*-: *OD TPGUXBSFFOHJOFFS

Slide 3

Slide 3 text

*20/঺հ Ҏ্ͷϑΝογϣϯ&$αΠτ͔Β ྦྷܭ ສ఺Λ௒͑Δ঎඼Λܝࡌ ݄ؒສਓҎ্͕ར༻͢Δ೔ຊ࠷େڃͷϑΝογϣϯαΠτ

Slide 4

Slide 4 text

σʔλऩूج൫ͷ঺հ Πϕϯτϩά &-# "1*4FSWFS -PH "HHSFHBUPS 8FC4FSWFS #JH2VFSZ 3FDPNNFOE

Slide 5

Slide 5 text

σʔλ෼ੳج൫ͷ঺հ Ϛελʔσʔλ 3%4 .Z42- %BUBUSBOTGFS TFSWFS ($4 #JH2VFSZ ෗Γ͔͚͍ͯΔൿ఻ͷͨΕঢ়ଶ ɾNZTRMEVNQ US TFE FUDΛෳࡶʹ૊Έ߹Θ͍ͤͯΔ ɾςʔϒϧΛ෼ׂͯ͠సૹ͢ΔઃఆΛϋʔυίʔσΟϯά

Slide 6

Slide 6 text

σʔλ෼ੳج൫ͷ঺հ Ϛελʔσʔλ 3%4 .Z42- %BUBUSBOTGFS TFSWFS ($4 #JH2VFSZ ʹ&NCVMLΛಋೖ ɾಉظόον͕མͪΔ͜ͱ͕΄΅ͳ͘ͳΔ

Slide 7

Slide 7 text

͔͜͜ΒϝΠϯςʔϚ

Slide 8

Slide 8 text

ϚελʔσʔλͷಉظΛ ߴ଎Խ͍ͨ͠ w Ϣʔβʔ΁ͷՁ஋ͷఏڙΛߴ଎Խ͢ΔͨΊ w ݱঢ়঎඼৘ใͷಉظ͚ͩͰ໿࣌ؒ෼ ໿ ສߦ ໿(#

Slide 9

Slide 9 text

࣌ؒܭଌ 3%4 .Z42- %BUBUSBOTGFS TFSWFS ($4 #JH2VFSZ NJO .Z42-ͷςʔϒϧΛμϯϓ NJO μϯϓΛ($4ʹΞοϓϩʔυ NJO ($4͔Β#JH2VFSZʹϩʔυ

Slide 10

Slide 10 text

.Z42-ͷμϯϓ͕ ϘτϧωοΫ w Ϛελʔσʔλͷಉظ͸ຖ೔ߦ͍ͬͯΔͨΊɺ
 ࡢ೔ͱಉ͡σʔλ͸ಉظ͢Δඞཁͳ͠ w 3VCZPO3BJMTΛ࢖༻͍ͯ͠ΔͷͰɺ
 VQEBUFE@BUʹͦͷߦͷߋ৽࣌ࠁ͕ೖ͍ͬͯΔ

Slide 11

Slide 11 text

ࠩ෼ߋ৽ͯ͠ΈΔ ςʔϒϧ ࠩ෼ͷΈ ςʔϒϧ લ೔෼ ςʔϒϧͷϚʔδ 0-"1ؔ਺Λ׆༻ લճͷಉظҎ߱ͷσʔλͷΈ where: "updated_at > ..."

Slide 12

Slide 12 text

લճͷಉظҎ߱ͷσʔλΛऔಘ w JOQVUQMVHJONZTRMͷઃఆʹXIFSFΛ௥Ճ͢Δ w औಘ͢Δඞཁͷ͋Δߦ͕ҎԼʹͳΔ in: type: mysql host: example.com user: user_name password: ******** database: db_name table: items select: "*" where: "updated_at > '2017-05-15 00:00:00'" # この行を追加

Slide 13

Slide 13 text

42-ͰςʔϒϧΛϚʔδ w ͭͷςʔϒϧΛVOJPOBMMͰ݁߹͠ɺओΩʔͰ QBSUJUJPOCZͯ͠৽͍͠ߦͷΈΛબ୒ w ͜ͷ42-ͷ݁ՌΛݩͷςʔϒϧʹॻ͖໭͢ select * from ( select *, row_number() over (partition by id order by updated_at desc) as rn from ( select * from tmp.items union all select * from mysql.items ) ) where rn = 1

Slide 14

Slide 14 text

݁Ռ 3%4 .Z42- %BUBUSBOTGFS TFSWFS ($4 #JH2VFSZ NJO ˠNJO NJO ˠNJO NJO ˠNJO શମͰഒͷߴ଎Խ ໿INJOˠNJO ςʔϒϧͷϚʔδ NJOˠNJO

Slide 15

Slide 15 text

৽ͨͳ՝୊ w Ϛελʔσʔλͷಉظ͕ෳࡶʹͳΓͦ͏ w ֤ॲཧͷʮྲྀΕʯΛ؅ཧ͢Δπʔϧ͕ཉ͍͠ %JHEBH "JSqPX -VJHJ

Slide 16

Slide 16 text

·ͱΊ w &NCVML͸όϧΫసૹͷҋΛরΒͯ͘͠ΕΔπʔϧ w σʔλͷࠩ෼ߋ৽ʹΑͬͯഒߴ଎Խ w ӡ༻ϑΣʔζͰ͸ଞͷπʔϧͱͷ࿈ܞ͕ඞཁ