Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SQLアンチパターン勉強会 #2
Search
yusuke sasajima
December 12, 2013
Programming
0
350
SQLアンチパターン勉強会 #2
やっと第二回開催。。。
資料作るの大変だけど、たのしす〜
yusuke sasajima
December 12, 2013
Tweet
Share
More Decks by yusuke sasajima
See All by yusuke sasajima
一休.com を支えるデータ分析基盤
zimathon
3
5.8k
一休.comにおけるfrontend開発
zimathon
3
1.3k
Other Decks in Programming
See All in Programming
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
570
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
970
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
役立つログに取り組もう
irof
26
8.6k
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
250
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Statistics for Hackers
jakevdp
796
220k
Fireside Chat
paigeccino
32
3k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
A Tale of Four Properties
chriscoyier
156
23k
Facilitating Awesome Meetings
lara
49
6k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Gamification - CAS2011
davidbonilla
80
5k
Thoughts on Productivity
jonyablonski
67
4.3k
Transcript
SQLΞϯνύλʔϯ #2 ॓ധࣄۀຊ෦γεςϜ։ൃ෦ ౡ༞հʢ!TJTJKVNJʣ
ຊͷΞδΣϯμ ˔ɹ͡Ίʹʢʣ ɹࢿྉΛ࡞ͬͯΈͯ ͔͔࣌ؒΔ ɹୈࡾճ୭͕Δͷʁʁ ˔ɹຊฤʢʣ ɹষɿΠϯσοΫεγϣοτΨϯʢҋӢʣ ˔ɹΈΜͳͰ͓ʢʣ
ΠϯσοΫεγϣοτΨϯʁ
ΠϯσοΫεͷత w ύϑΥʔϚϯεʂ w ύϑΥʔϚϯεʂʂ w ύϑΥʔϚϯεʂʂʂ w ͯ͢ੑೳͷͨΊ
ΠϯσοΫεΛཧղ͠ͳ͍· ·ͩͱɻɻɻ w ΠϯσοΫεΛ·ͬͨ͘ఆٛ͠ͳ͍͔ɺ গ͚ͩ͠ఆٛ͢Δ͜ͱʹͳΔ w ΠϯσοΫεΛଟ͘ఆٛ͗͢͠Δ͔ɺ ཱͨͳ͍ΠϯσοΫεΛఆٛ͢ΔʢΠϯ σοΫιʣ w
ΠϯσοΫεΛ׆༻͠ͳ͍ΫΤϦΛ࣮ߦ ͯ͠͠·͏
͓͞Μɺ ΠϯσοΫε ͬͯʁ
ΠϯσοΫεͱ දྫ w #5SFFΠϯσοΫε w ϏοτϚοϓΠϯσοΫε w ؔΠϯσοΫεʢ0SBDMF͚ͩʣ w ྻετΞΠϯσοΫε
ΠϯσοΫεͱ
ΠϯσοΫεͷҙ ΠϯσοΫεΛར༻ͯ͠ৗʹ͘ ͳΒͳ͍ w औಘϨίʔυ શମͷҎԼɿΠϯσοΫεΛ༻ͨ͠ํ͕͍ શମͷˋΛ͑ͨɿςʔϒϧϑϧεΩϟϯ͕͍ ˞
ҰൠతʹdͷൣғʢΒ͍͠Ͱ͢ʣ
ΧόϦϯάΠϯσοΫεʁ w ຊདྷͷΠϯσοΫεʹෆཁͳྻΛఆٛ ɹ࡞ྫ $SFBUF*OEFYCVHDPWFSSJOHPOCVT TUBUVT CVH@JE EBUF@SFQPSUFE@CZ
TVNNBSZ ! 4FMFDUTUBUVT CVE@JE EBUF@SFQPSUFE TVNNBSZ 'SPN#VHT8IFSFTUBUVTbPQFO` ! ॓ധͩͱ༧ςʔϒϧͱ͔ͰΠϝʔδ͍͢͠
Ξϯνύλʔϯᶃ ΠϯσοΫεΛશ͘ఆٛ͠ͳ͍ w ΠϯσοΫεΛѱͩͱߟ͑ͯ͠·͏ ʮͳΜ͔ɺΦʔόʔϔου͕ൃੜ͢ΔΒ ͍͠͡ΌΜɻʯ w ͋·ΓΒͳ͍ͷʹɺΦʔόʔϔου ͱ͍͏୯ޠ͚ͩͰఆٛ͠ͳ͍ ϞολΠφΠʂʂ
Ξϯνύλʔϯᶄ ΠϯσοΫεΛଟ͘ఆٛ͗͢͠Δ DSFBUFUBCMFCVHT CVE@JE 4&3*"-13*."3:,&:
EBUF@SFQPSUFE %"5&/05/6-- TVNNBSZ WBSDIBS TUBUVT IPVST */%&9 CVH@JE */%&9 TVNNBSZ */%&9 IPVST */%&9 CVE@JE EBUF@SFQPSUFE TUBUVT
Ξϯνύλʔϯᶄ ΠϯσοΫεΛଟ͘ఆٛ͗͢͠Δ DSFBUFUBCMFCVHT CVE@JE 4&3*"-13*."3:,&:
EBUF@SFQPSUFE %"5&/05/6-- TVNNBSZ WBSDIBS TUBUVT IPVST */%&9 CVH@JE */%&9 TVNNBSZ */%&9 IPVST */%&9 CVE@JE EBUF@SFQPSUFE TUBUVT ෳ߹ΠϯσοΫεࠨ͔ΒߜΓࠐ·ΕΔ͔Βແବ PKࣗಈੜ͞Ε͍ͯΔ ΠϯσοΫεલํҰகͷΈ༗ޮͷͨΊɺ! ແବʹͳΔՄೳੑ͕ߴ͍
Ξϯνύλʔϯᶅ ΠϯσοΫεཱ͕ͨͳ͍ʢΠϯσοΫιʣ ΠϯσοΫεΛ͑ͳ͍ΫΤϦΛ࣮ߦ͢Δ͜ͱ ຐ๏ͷΑ͏ͳྻͷΈ߹Θͤ ΠϯσοΫεͷΦϓγϣϯ खΓ࣍ୈʹΠϯσοΫεΛ࡞ͯ͠͠·͏ ։ൃऀ
None
͍͑ɺ͋ͳͨͷ͜ͱͰ͢ɻ
Ξϯνύλʔϯᶅ ΠϯσοΫεཱ͕ͨͳ͍ʢΠϯσοΫιʣ ిாͰྫ͑Δʢ໊ࣈɺ໊લͷॱʹฒΜ Ͱ͍Δʣͱ ໊ࣈɿνϟʔϧζʢ˕ɿ͙͢ݟ͔ͭΔʣ ໊લɿνϟʔϧζʢºɿ͔͔࣌ؒΔʣ
ిாͷࡧҾΛ۩ମతʹॻ͍ͯΈ·ͨ͠ɻ $ νϟʔϧζɾέϯεέ νϟʔϧζɾϢεέ νϟʔϧζɾνϟʔϧζ % σϏοτɾνϟʔϧζ σϏοτɾϕοΧϜ ̚ ΤϦοΫɾνϟʔϧζ
' ϑΥϨετɾΨϯϓ ϑΥʔϦϯɾὑ ϑΥΧονϟɾνϟʔϧζ ϝϦοτΛಘΒΕͳ͍ΠϯσοΫε $3&"5&*/%&95FMFQIPOF#PPL PO"DDPVOUT MBTU@OBNF pSTU@OBNF !
Ξϯνύλʔϯͷݟ͚ͭํ ࣍ͷݴ༿ʹؾΛ͚ͭΔ ʮ͜ͷΫΤϦΛߴԽ͍ͨ͠Μ͚ͩͲɺͲ͏͢Ε͍͍ʁʯ ୭͔ʹ૬ஊ͢Δ ʮϑΟʔϧυશ෦ʹΠϯσοΫεΛఆٛͨ͠ͷʹɺͳ࣮ͥߦ ͕͘ͳΒͳ͍ͷͩΖ͏ʁʯ έʔεᶄʹ֘ ʮσʔλϕʔεΛ͘͢Δͱॻ͍͍ͯΔͷΛԿ͔ͰಡΜͩ͜ͱ͕ ͋ΔɻͦΕҎདྷɺΠϯσοΫεΘͳ͍Α͏ʹ͍ͯ͠Δʯ έʔεᶃʹ֘
Ͳ͏ͯͦ͠͏ͳΔʁ w ΠϯσοΫεʹ͍ͭͯΒͳ ͍ʢ·͔ͨͬͨͿΓΛ͠ ͍ͯΔʣ w ߟ͍͑ͯͳ͍ʢߟ͑Δ͜ͱΛ ์غ͍ͯ͠Δʣ w ΠϯσοΫεʹؔͯ͠૬ஊͰ
͖Δਓ͕͍ͳ͍
ίϥϜʣબੑʹ͍ͭͯ w બ੍ͱʁ σʔλϕʔεΠϯσοΫεʹ͍ͭͯͷ౷ ܭ ςʔϒϧͷ૯ߦʹ͍ͨ͢ΔΠϯσοΫ εͷதͷݸผͷͷͷׂ߹
TFMFDU DPVOU EJTUJODUTUBUVT DPVOU TUBUVT BTTFMFDUJWJUZ 'SPN#VHT
બੑͷΠϯσοΫε ͷछྨ͕গͳ͍ΧϥϜʹ͍ͭͯɺΠϯ σοΫεΛ࡞ͯ͠ʹཱͨͳ͍ ྫʣੑผɺྸͳͲ
None
ΞϯνύλʔϯΛ ༻͍ͯΑ͍߹
͑ɺɺɺͦΜͳ͜ͱ ͍͍ͯ͠ͷʁ
͍͍ΜͰ͢ʂʂʂ
͍ɺΑ͘ͳ͍Ͱ͠ΐ ʢসʣ
࠷ॳΈΜͳΘ͔Βͳ͍ w ͲͷΑ͏ͳΫΤϦ͕࣮ߦ͞ΕΔ͔Θ͔Βͳ͍ w ΫΤϦ͕Θ͔Βͳ͍͔Βɺ࠷దͳΠϯσοΫ ε࡞Εͳ͍ w ࡞ͨ͠ޙͰɺෆཁʹͳΔέʔεଘࡏͯ͠ ͍Δ Ͱ͖ΔݶΓɺेͳใʹج͍ͮͯݕ౼͠Α
͏
ʮ.&/503ʯͷݪଇ w .FBTVSFʢଌఆʣ w &YQMBJOʢղੳʣ w /PNJOBUFʢࢦ໊ʣ w 5FTUʢςετʣ w
0QUJNJ[Fʢ࠷దԽʣ w 3FCVJMEʢ࠶ߏஙʣ
.FBTVSFʢଌఆʣ w 42-ͷΫΤϦ࣮ߦ࣌ؒΛଌఆ͢Δ w ࠷ଟ͘ͷ࣌ؒΛফඅ͢ΔΫΤϦΛಛ ఆ ˞Ωϟογϡແޮʹͯ͠ w
ϓϩϑΝΠϦϯάʹΑͬͯɺΑΓਖ਼֬ ͳใ͕औಘՄೳ
&YQMBJOʢੳʣ w ΫΤϦ࣮ߦܭը ʢ2VFSZ&YFDVUJPO1MBOɿ2&1ʣʹΑ ΔੳΛ࣮ࢪ w .JDSPTPGU42-4FSWFS 4&54)081-"/@9.-
/PNJOBUFʢࢦ໊ʣ w ΫΤϦͷ2&1ΛಡΜͰɺΠϯσοΫεΛ Θͳ͍ͰςʔϒϧʹΞΫηε͍ͯ͠Δ ՕॴΛ୳ͤʂ w ϕϯμʔ͝ͱʹศརͳπʔϧ͕͋Δ͔Βɺ ͦΕΛͬͯΈΑ͏ w .JDSPTPGU
42-4FSWFS%BUBCBTF&OHJOF5VOJOH"EWJTPS
5FTU w ࠶ͼΫΤϦͷϓϩϑΝΠϦϯά w มߋ͕ͨΒͨ͜͠ͱΛ֬ೝ͔ͯ͠Β ࡞ۀ͢Δ
0QUJNJ[Fʢ࠷దԽʣ w ͳΔ͖ΩϟογϡϝϞϦʹͷͤΑ͏ ˞ͨͩ͠ɺͦΕ͓͍ͷγεςϜʹ ґଘ͠·͢ w ΠϯσοΫεΛ͋Β͔͡ΊΩϟογϡʹ ͷͤΔͱϝϦοτ͕ಘΒΕΔέʔε
.Z4RMɿ-0"%*/%&9*/50$"$)&
3FCVJMEʢ࠶ߏஙʣ w ΠϯσοΫεߦͷߋ৽আʹΑͬ ͯɺ࣍ୈʹෆۉߧʹ ϦϏϧυ͠·͠ΐ͏ w .JDSPTPGU "-5&3*/%&9ʜ3&$03(/*;&
ΠϯσοΫεͲ͏͚ͭΔ͔ͬ ͯɺ͍͠Ͷ ᶃΠϯσοΫε͕༻͞ΕΔՄೳੑ͕ߴ͍߹ͷΈઃ ఆ͢ΔΑ͏ʹઃܭ͢Δ ӡ༻தͷύϑΥʔϚϯεվળΛߦ͍ͭͭɺඞཁͳΠϯσοΫεͷΈઃఆ͍ͯ͘͠ ᶄଟগͯ͘ઃఆ͢ΔΑ͏ʹઃܭ͢Δ ଟগΠϯσοΫε͕ແବʹͳͬͯํ͕ͳ͍͕ɺӡ༻தͷύϑΥʔϚϯεվળͷػձΛ͋ ·Γ࣋ͨͳͯ͘ྑ͍Α͏ʹ͢Δ ! ྆ํΔ͠
·ͱΊ w ਪଌͷΈʹج͍ͮͯɺҋӢʹΠϯσοΫεΛͭ ͚͍͚ͯͳ͍ w ΠϯσοΫεΛཧղ͠ͳ͍··ɺ༻Մ൱Λ அ͍͚ͯ͠ͳ͍ w কདྷతͳσʔλྔͳͲɺΠϯσοΫεΛ༧ଌ͢ Δͷ͚ͬ͜͏͠ΜͲ͍
w .&/503ͷݪଇʹج͍ͮͯɺΠϯσοΫεΛ ཧ͢Δ
ΠϯσοΫ εͱྑ͘ Ͷʂʂ