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
2大OSSデータベースのMySQLとPostgreSQLの違い(後半)
Search
soudai sone
April 02, 2016
Technology
6
4.2k
2大OSSデータベースのMySQLとPostgreSQLの違い(後半)
第32回 PostgreSQL 勉強会(2015年10月10日)の資料です。
https://www.postgresql.jp/wg/shikumi/pgstudy_32/view
soudai sone
April 02, 2016
Tweet
Share
More Decks by soudai sone
See All by soudai sone
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
30
8.4k
仕事を前に進めるためのコツ - 判断と決断と共有 / Aim for the goal
soudai
84
36k
アプリケーションが 正しく動作するということ - 自動テスト編 / Automated Testing
soudai
15
3.1k
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
8
1.8k
**強い**エンジニアのなり方 - フィードバックサイクルを勝ち取る / grow one day each day
soudai
120
110k
マルチテナントの実現におけるDB設計とRLS / Utilizing RSL in multi-tenancy
soudai
26
8.2k
キャッシュと向き合う、キャッシュと共に生きる / cache pattern
soudai
38
16k
RDBアンチパターンと戦う - 削除フラグ 完全攻略ガイド / delete flag
soudai
30
18k
コミュニティと共に生きる - キャリアの螺旋 / live with community
soudai
8
5.9k
Other Decks in Technology
See All in Technology
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
190
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
690
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
130
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Why Our Code Smells
bkeepers
PRO
334
57k
How GitHub (no longer) Works
holman
310
140k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
A Tale of Four Properties
chriscoyier
156
23k
Transcript
2େOSSσʔλϕʔεͷ MySQLͱPostgreSQLͷҧ͍ (ޙ) ୈ32ճ PostgreSQL ษڧձ
What is it? ͜ͷεϥΠυͷ గਖ਼Օॴ ΛؚΊͨϒϩάͪ͜Β IUUQTPVEBJCMPHTQPUKQPTTNZTRMQPTUHSFTRMIUNM
What is it? લઓΛऴ͑ͯ
What is it? લઓΛऴ͑ͯ ˣ .Z42-ͱ1PTUHSF42-͕ҧ͏ͷΘ͔ͬͨ
What is it? લઓΛऴ͑ͯ ˣ .Z42-ͱ1PTUHSF42-͕ҧ͏ͷΘ͔ͬͨ ˣ ΠϯυͱΠϯυωγΞ͘Β͍ҧ͏
What is it? લઓΛऴ͑ͯ ˣ .Z42-ͱ1PTUHSF42-͕ҧ͏ͷΘ͔ͬͨ ˣ +BWBͱ+BWB4DSJQU͘Β͍ҧ͏
What is it? લઓΛऴ͑ͯ ˣ .Z42-ͱ1PTUHSF42-͕ҧ͏ͷΘ͔ͬͨ ˣ +BWBͱ+BWB4DSJQU͘Β͍ҧ͏ ྨࣅྫҰཡ ΠϯυͱΠϯυωγΞҧ͏
,0'ͷژͱ,0'ͷژ͘Β͍ҧ͏ ετͷϦϡͱέϯ͘Β͍ҧ͏ ए೫Ֆͱو೫Ֆ͘Β͍ҧ͏ ϙέϞϯͱ༯ոΥον͘Β͍ҧ͏ લా݈ଠͱલాஐಙ͘Β͍ҧ͏ ʜͳͲ
What is it? ͭ·Γಉ͡3%#Ͱ݁ߏҧ͏
What is it? Ͱػೳͷҧ͍͚ͩͰઓྗͷҧ͍ʹͳΒͳ͍
What is it? Ћͷ෦Λ͝հ͠·͢
What is it? લఏ݅ લઓͷΛௌ͍ͯΔ͜ͱ·ͨݟͯΔ͜ͱ
What is it? લఏ݅ ଓɾ1PTUHSF42-ŧŔŕŪƂŜſ
What is it? લఏ݅ ଓɾ1PTUHSF42-ŧŔŕŪƂŜſ ˣ ࠷৽൛ͱ͔1PTUHSF42-ͷ᠘ͷͳ͍Ͱ͢
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
ࣗݾհ ໊લɿીࠜɹେʢͦͶɹ͚ͨͱʣ ྸɿ̏̌ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿWebΤϯδχΞ ॴଐɿຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦ ɹɹٕज़తʹLLܥݴޠͱ͔RDB͕͖Ͱ͢
ࣗݾհ ໊લɿીࠜɹେʢͦͶɹ͚ͨͱʣ ྸɿ̏̌ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿWebΤϯδχΞ ॴଐɿຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦ ɹɹٕज़తʹLLܥݴޠͱ͔RDB͕͖Ͱ͢
தࠃํDBษڧձ https://dbstudychugoku.github.io/
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
ίϛϡχςΟͷҧ͍ ߲ίϛϡχςΟ໊ .Z/" +16( ࢀՃํ๏ .-ͷొ .-ʹొਖ਼ձһొ ৫छྨ ༗ࢤʹΑΔϘϥϯςΟΞ /10๏ਓ
ӡӦࢿۚ ɹແ͠ ༗Γ ίϛϡχέʔγϣϯ πʔϧ .-ɾTMBDL .-ɾTMBDL
ίϛϡχςΟͷҧ͍ ߲ίϛϡχςΟ໊ .Z/" +16( ࢀՃํ๏ .-ͷొ .-ʹొਖ਼ձһొ ৫छྨ ༗ࢤʹΑΔϘϥϯςΟΞ /10๏ਓ
ӡӦࢿۚ ɹແ͠ ༗Γ ίϛϡχέʔγϣϯ πʔϧ .-ɾTMBDL .-ɾTMBDL
ίϛϡχςΟͷҧ͍ ߲ίϛϡχςΟ໊ .Z/" +16( ࢀՃํ๏ .-ͷొ .-ʹొਖ਼ձһొ ৫छྨ ༗ࢤʹΑΔϘϥϯςΟΞ /10๏ਓ
ӡӦࢿۚ ɹແ͠ ༗Γ ίϛϡχέʔγϣϯ πʔϧ .-ɾTMBDL .-ɾTMBDL
ίϛϡχςΟͷҧ͍ ༧ࢉͷ༗ແ w .Z42-Ϣʔβձ͓ۚͷ੍Λ࡞Βͳ͍ͨΊ ʹ༧ࢉΛ͑ͯઃ͚ͯͳ͍ w ຊ1PTUHSFTϢʔβձڠࢍۚΛूΊɺ/10 ๏ਓͱͯ͠ཧ͍ͯ͠Δ
ίϛϡχςΟͷҧ͍ ༧ࢉͷ༗ແ w .Z42-Ϣʔβձ͓ۚͷ੍Λ࡞Βͳ͍ͨΊ ʹ༧ࢉΛ͑ͯઃ͚ͯͳ͍ w ຊ1PTUHSFTϢʔβձڠࢍۚΛूΊɺ/10 ๏ਓͱͯ͠ཧ͍ͯ͠Δ ࠓͷަ௨අ+16(ʹࢧԉͯ͠Βͬͯ·͢
ίϛϡχςΟͷҧ͍ ϢʔβձͷΞτϓοτͷҧ͍ w +16(υΩϡϝϯτίϛϡχςΟͰ࡞ w .Z/"ݸʑͷΞτϓοτʹҕͶΔ ެࣜυΩϡϝϯτ0SBDMF͕࡞ w ษڧձͲͪΒਵ࣌ओମͰߦ͍ͬͯΔ
ίϛϡχςΟͷҧ͍ TMBDL͕ؾܰʹ࣭Ͱ͖ͯϨεϙϯεྑ͍ .Z42-ɿIUUQNZTRMDBTVBMTMBDLJOIFSPLVBQQDPN 1PTUHSF42-ɿIUUQTQPTUHSFTRMIBDLFSTKQIFSPLVBQQDPN
ίϛϡχςΟͷҧ͍ ಥવͰ͕͢ʜ
ίϛϡχςΟͷҧ͍ ಥવͰ͕͢ʜ ˣ ࠓ͙͢ϑΥϩʔ͖͢ΤϯδχΞϦετ
ίϛϡχςΟͷҧ͍ ಥવͰ͕͢ʜ ˣ ࠓ͙͢ϑΥϩʔ͖͢ΤϯδχΞϦετ େମࠓͷ͜ͷਓͨͪΛݟͯΕࣗવͱ֮͑Δ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ !3,BKJZBNB
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ !LBNJQP
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ !ZZBNBTBLJ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ !OJQQPOEBOKJ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢.Z42-ΤϯδχΞ !ZPLV
ίϛϡχςΟͷҧ͍ ԶΑΓڧ͍.Z42-ΤϯδχΞʹձ͍ʹߦ͘ ຊ.Z42-Ϣʔβձձʢ.Z/"ձʣಛผฤ Ϣʔβձपه೦ύʔςΟ ʙϢʔβձͱ.Z42-ͷΛৼΓฦΔʂʙ ։࠵ɿ݄ ۚ ։࠵࣌ࠁɿΛ༧ఆ ձɿגࣜձࣾίϩϓϥ
ʢ౦ژɾܙൺणΨʔσϯϓϨΠελϫʔ֊ʣ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ 1PTUHSF42-ͳਓɺ5XJUUFSͬͯͳ͍
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !GVKJJ@NBTBP
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !TOBHB
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !T
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !TBXBEB@NBTBIJLP
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !OPCPSVT
ίϛϡχςΟͷҧ͍ ࠓ͙͢ϑΥϩʔ͖͢1PTUHSF42-ΤϯδχΞ !OVLP@ZPLPIBNB
ίϛϡχςΟͷҧ͍ 1PTUHSF42-ΧϯϑΝϨϯε ࣌ɿ݄ ۚ ɹʙ ॴɿ"1ɹ ౦ژߓ۠ߴྠ౦ٸୈೋϏϧ ༰ɿޕલجௐߨԋΛؚΉߨԋΛ༧ఆ ޕޙτϥοΫʹͯߨԋఔΛ༧ఆɻ
ΧϯϑΝϨϯεऴྃޙʹ࠙ձ͕͋Γ·͢ɻ ࢀՃਓݟࠐΈɿ໊ ҰൠࢀՃ໊ఔ ࢀՃඅɿ ԁΛ༧ఆ IUUQXXXQPTUHSFTRMKQFWFOUTKQVHQHDPO
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
ϋϚϦͲ͜ΖͷTips ͓ͨͤ͠·ͨ͠ ຊͷϝΠϯͰ͢
ϋϚϦͲ͜ΖͷTips ຊͷ͓ॻ͖ .Z42-ฤ w ᐆດͳάϧʔϓ w SPPU͢ w ᐆດͳ
w ΪϟοϓϩοΫͱτϥϯβΫγϣϯϨϕϧ
ϋϚϦͲ͜ΖͷTips ຊͷ͓ॻ͖ .Z42-ฤ w ᐆດͳάϧʔϓ w SPPU͢ w ᐆດͳ
w ΪϟοϓϩοΫͱτϥϯβΫγϣϯϨϕϧ
ϋϚϦͲ͜ΖͷTips 4&-&$5 '30.TBNQMF JE HSPVQ OBNF BHF ౡ 4POF
ౡ TPOF ࢁ TPVEBJ ࢁ UBLFUPNP
ᐆດͳGROUP SELECT id, `group`,age FROM sample GROUP BY `group`
ᐆດͳGROUP SELECT id, `group`,age FROM sample GROUP BY `group` HSPVQ͕༧ޠͳͷͰAͰғΉ
ϋϚϦͲ͜ΖͷTips ݁Ռ JE HSPVQ BHF ౡ ࢁ
ϋϚϦͲ͜ΖͷTips ݁Ռ JE HSPVQ BHF ౡ ࢁ
6OJRVFͰແ͍ͷͰԿ͕ग़Δ͔Θ͔Βͳ͍
ϋϚϦͲ͜ΖͷTips LBNJQP53"%*5*0/"-
ᐆດͳGROUP SET SESSION sql_mode=‘TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY’; SELECT id, `group`,age FROM sample GROUP
BY `group`;
ᐆດͳGROUP SET SESSION sql_mode=‘TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY’; SELECT id, `group`,age FROM sample GROUP
BY `group`;
ᐆດͳGROUP SET SESSION sql_mode=‘TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY’; SELECT id, `group`,age FROM sample GROUP
BY `group`; .Z42-ͷಠ֦ࣗுΛແޮʹ͢Δ
ᐆດͳGROUP SET SESSION sql_mode=‘TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY’; SELECT id, `group`,age FROM sample GROUP
BY `group`; ͪΖΜNZDPOGʹ͔͍ͯྑ͍
ϋϚϦͲ͜ΖͷTips ຊͷ͓ॻ͖ .Z42-ฤ w ᐆດͳάϧʔϓ w SPPU͢ w ᐆດͳ
w ΪϟοϓϩοΫͱτϥϯβΫγϣϯϨϕϧ w ͑Δͷͭ
root2͢ ——ΞΧϯτΛ֬ೝ͢Δ SELECT user , host FROM user;
ϋϚϦͲ͜ΖͷTips ݁Ռ VTFS IPTU SPPU SPPU SPPU MPDBMIPTU
ϋϚϦͲ͜ΖͷTips ݁Ռ VTFS IPTU SPPU SPPU SPPU MPDBMIPTU
ͦΕͧΕผϢʔβ
ϋϚϦͲ͜ΖͷTips ݁Ռ VTFS IPTU SPPU SPPU SPPU MPDBMIPTU
ΞΫηεग़དྷΔIPTU
ϋϚϦͲ͜ΖͷTips ݁Ռ VTFS IPTU SPPU SPPU SPPU MPDBMIPTU
QH@ICB@DPOG૬
ϋϚϦͲ͜ΖͷTips ຊͷ͓ॻ͖ .Z42-ฤ w ᐆດͳάϧʔϓ w SPPU͢ w ᐆດͳ
w ΪϟοϓϩοΫͱτϥϯβΫγϣϯϨϕϧ
ᐆດͳ SELECT * FROM sample WHERE name = 'sone'
ϋϚϦͲ͜ΖͷTips ݁Ռ JE HSPVQ OBNF BHF ౡ 4POF
ౡ TPOF
ϋϚϦͲ͜ΖͷTips ݁Ռ JE HSPVQ OBNF BHF ౡ 4POF
ౡ TPOF
ϋϚϦͲ͜ΖͷTips ݁Ռ JE HSPVQ OBNF BHF ౡ 4POF
ౡ TPOF େจࣈখจࣈΛൺֱͯ͠ͳ͍
ϋϚϦͲ͜ΖͷTips ຊͷ͓ॻ͖ .Z42-ฤ w ᐆດͳάϧʔϓ w SPPU͢ w ᐆດͳ
w ΪϟοϓϩοΫͱτϥϯβΫγϣϯϨϕϧ
ϋϚϦͲ͜ΖͷTips τϥϯβΫγϣϯϨϕϧ Ϩϕϧ μʔςΟ Ϧʔυ ϑΝδʔ Ϧʔυ ϑΝϯτϜ Ϧʔυ ಡΈऔΓ
ϩοΫ 3&"% 6/$0..*55&% :FT :FT :FT /P 3&"% $0..*55&% /P :FT :FT /P 3&1&"5"#-& 3&"% /P /P :FT /P 4&3*"-*;"#-& /P /P /P /P
ϋϚϦͲ͜ΖͷTips τϥϯβΫγϣϯϨϕϧ Ϩϕϧ μʔςΟ Ϧʔυ ϑΝδʔ Ϧʔυ ϑΝϯτϜ Ϧʔυ ಡΈऔΓ
ϩοΫ 3&"% 6/$0..*55&% :FT :FT :FT /P 3&"% $0..*55&% /P :FT :FT /P 3&1&"5"#-& 3&"% /P /P :FT /P 4&3*"-*;"#-& /P /P /P /P .Z42-ͷσϑΥϧτ
ϋϚϦͲ͜ΖͷTips τϥϯβΫγϣϯϨϕϧ Ϩϕϧ μʔςΟ Ϧʔυ ϑΝδʔ Ϧʔυ ϑΝϯτϜ Ϧʔυ ಡΈऔΓ
ϩοΫ 3&"% 6/$0..*55&% :FT :FT :FT /P 3&"% $0..*55&% /P :FT :FT /P 3&1&"5"#-& 3&"% /P /P :FT /P 4&3*"-*;"#-& /P /P /P /P 1PTUHSF42-ͷσϑΥϧτ
ίϛϡχςΟͷҧ͍ ΪϟοϓϩοΫ w .Z42-ͷσϑΥϧτ3&1&"5"#-&3&"% w *OOPECߋ৽ରͷߦ͚ͩΛϩοΫͰͳ͍ʂ w ༧֎ͷϩοΫΛऔಘ͢Δ w ߋ৽ॲཧͳͲͰϩοΫ͕ͪൃੜ͢Δ͜ͱ͕͋Δ
ίϛϡχςΟͷҧ͍ ΪϟοϓϩοΫ w .Z42-ͷσϑΥϧτ3&1&"5"#-&3&"% w *OOPECߋ৽ରͷߦ͚ͩΛϩοΫͰͳ͍ʂ w ༧֎ͷϩοΫΛऔಘ͢Δ w ߋ৽ॲཧͳͲͰϩοΫ͕ͪൃੜ͢Δ͜ͱ͕͋Δ
ΪϟοϓϩοΫ begin; SELECT * FROM lock_demo WHERE id >= 5
AND id <= 10 FOR UPDATE; commit;
ΪϟοϓϩοΫ begin; SELECT * FROM lock_demo WHERE id >= 5
AND id <= 10 FOR UPDATE; commit; ൣғΛࢦఆͯ͠ϩοΫΛऔಘ
ΪϟοϓϩοΫ INSERT INTO `demo`.`lock_demo` (`id`, `name`) VALUES ('7', 'test');
ΪϟοϓϩοΫ INSERT INTO `demo`.`lock_demo` (`id`, `name`) VALUES ('7', 'test'); ؒͷۭߦ*/4&35
ΪϟοϓϩοΫ INSERT INTO `demo`.`lock_demo` (`id`, `name`) VALUES ('7', 'test'); ؒͷۭߦ*/4&35
͜ͷ*/4&35ͨ͞ΕΔʂʂ
ίϛϡχςΟͷҧ͍ ΪϟοϓϩοΫͷҙ w ࣮ମҎ֎ͷϨίʔυϩοΫΛऔΔ w ൣғͷۭߦͰϩοΫ w ۭৼΓͷ4&-&$5'0361%"5&ͰϩοΫ w ্ݶͷແ͍8)&3&ͩͱશ෦ϩοΫ
ίϛϡχςΟͷҧ͍ ΪϟοϓϩοΫͷҙ w ࣮ମҎ֎ͷϨίʔυϩοΫΛऔΔ w ൣғͷۭߦͰϩοΫ w ۭৼΓͷ4&-&$5'0361%"5&ͰϩοΫ w ্ݶͷແ͍8)&3&ͩͱશ෦ϩοΫ
ؒͷۭߦ*/4&35
ίϛϡχςΟͷҧ͍ ΪϟοϓϩοΫͷҙ w ࣮ମҎ֎ͷϨίʔυϩοΫΛऔΔ w ൣғͷۭߦͰϩοΫ w ۭৼΓͷ4&-&$5'0361%"5&ͰϩοΫ w ্ݶͷແ͍8)&3&ͩͱશ෦ϩοΫ
8)&3&JEͳͲةݥ
ϋϚϦͲ͜ΖͷTips ߋʹωΫετΩʔϩοΫ͋Δ
ϋϚϦͲ͜ΖͷTips ߋʹωΫετΩʔϩοΫ͋Δ ˣ ߋ৽ߦͷલޙͷϩοΫΛऔΔ
ϋϚϦͲ͜ΖͷTips ͍ͷͰଓ͖8FCͰ !LBNJQP͞ΜͷϒϩάΛҾ༻ *OOP%#ͷϩοΫͷൣғͱωΫετΩʔϩοΫͷ IUUQCMPHLBNJQPOFUFOUSZ
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
MySQL 5.7ͱPostgreSQL 9.5 ྆%#ͷ࠷৽൛
MySQL 5.7ͱPostgreSQL 9.5 ྆%#ͷ࠷৽൛ ˣ ͦΖͦΖਖ਼ࣜ൛͕ग़Δ
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42-ͷΛฉ͖ʹདྷͨਓʁ
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42-ͷΛฉ͖ʹདྷͨਓʁ ˣ ೦ɺ಄Ͱ৮Ε·͕ͨ͠આ໌͠·ͤΜ
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42-
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42- ˣ ϧʔΫɺʮࣰాͷދͷרͦͷ̐ʯΛ͑ ελʔɾΥʔζݟͨ͜ͱແ͍͚Ͳ
MySQL 5.7ͱPostgreSQL 9.5 ஶऀͷࣰా͞Μ
MySQL 5.7ͱPostgreSQL 9.5 ஶऀͷࣰా͞Μ ˣ ୈճதࠃํ%#ษڧձJOग़Ӣ Ͱ1PTUHSF42-ͷΛͯ͘͠Ε·͢
MySQL 5.7ͱPostgreSQL 9.5 ͋ͱᖒా͞Μ͕1PTUHSF42-ৄ͍͠
MySQL 5.7ͱPostgreSQL 9.5 ͋ͱᖒా͞Μ͕1PTUHSF42-ৄ͍͠ ˣ 1PTUHSF42-৽ػೳհ IUUQXXXTMJEFTIBSFOFUIBEPPQYOUUEBUBQPTUHSFTRMOFXGFBUVSFTOUUEBUB ֆͱ͔͍ͬͺ͍͋ΔͷͰॳ৺ऀʹ༏͍͠ࢿྉͱͳ͓ͬͯΓ·͢
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42-ΧϯϑΝϨϯε ߦͬͨΒ୭͔ͯ͠ΔΑ ʢଟɺ͖ͬͱɺ.BZCFʣ
MySQL 5.7ͱPostgreSQL 9.5 .Z42-ͷৄࡉ
MySQL 5.7ͱPostgreSQL 9.5 .Z42-ͷৄࡉ ˣ தࠃํ%#ษڧձʹஔ͍ͯ͋ΔΑ IUUQTECTUVEZDIVHPLVHJUIVCJP
MySQL 5.7ͱPostgreSQL 9.5 .Z42-ͷৄࡉ ˣ தࠃํ%#ษڧձʹஔ͍ͯ͋ΔΑ IUUQTECTUVEZDIVHPLVHJUIVCJP ͔͠ಈը͖
MySQL 5.7ͱPostgreSQL 9.5 தࠃํ%#ษڧձ ୈճ.Z42-ͷ࠷৽ࣄ ֿࢁ͞Μ ୈճ.Z42-࠷৽ࣄ ֿࢁ͞Μ
ୈճ.Z42-3$ొʂ࣍ͷ.Z42-͕͜͜ҧ͏ͬʂ ֿࢁ͞Μ ୈճ.Z42-։ൃ࠷৽ಈ ࢁ࡚͞Μ ͦͷதͰ͍͔ͭ͘ϐοΫΞοϓ
MySQL 5.7ͱPostgreSQL 9.5 ιʔείʔυ͕HJUIVCͰެ։͞Εͨ ެࣜϦϙδτϦ IUUQTHJUIVCDPNNZTRM .Z42-ຊମҎ֎ʹ໘ന͍ͷ͕ࢁʂ
MySQL 5.7ͱPostgreSQL 9.5 ߴԽ w ಉҰεΩʔϚͰϚϧνεϨουରԠ w ΦϓςΟϚΠβ͕ΑΓݡ͘ w *OOP%#ʹຊޠશจݕࡧ͕Ճ
w WJSUVBMDPMVNO w .Z42-ΑΓഒɺΑΓഒૣ͘ʂ
MySQL 5.7ͱPostgreSQL 9.5 ߴԽ w ಉҰεΩʔϚͰϚϧνεϨουରԠ w ΦϓςΟϚΠβ͕ΑΓݡ͘ w *OOP%#ʹຊޠશจݕࡧ͕Ճ
w WJSUVBMDPMVNO w .Z42-ΑΓഒɺΑΓഒૣ͘ʂ
MySQL 5.7ͱPostgreSQL 9.5
MySQL 5.7ͱPostgreSQL 9.5
MySQL 5.7ͱPostgreSQL 9.5 ߴԽ w ಉҰεΩʔϚͰϚϧνεϨουରԠ w ΦϓςΟϚΠβ͕ΑΓݡ͘ w *OOP%#ʹຊޠશจݕࡧ͕Ճ
w WJSUVBMDPMVNO w .Z42-ΑΓഒɺΑΓഒૣ͘ʂ ಛʹߴෛՙ͕࣌ૣ͘ͳͬͨ
MySQL 5.7ͱPostgreSQL 9.5 ߴػೳԽ w ΫΤϦɾϦϥΠτɾϓϥάΠϯ w +40/ܕΛαϙʔτ w ϨϓϦέʔγϣϯͷڧԽ
MySQL 5.7ͱPostgreSQL 9.5 ߴػೳԽ w ΫΤϦɾϦϥΠτɾϓϥάΠϯ w +40/ܕΛαϙʔτ w ϨϓϦέʔγϣϯͷڧԽ
·ͩ1PTUHSF42-ͷํ͕Ұͷ͕͋Δ
MySQL 5.7ͱPostgreSQL 9.5 ߴػೳԽ w ΫΤϦɾϦϥΠτɾϓϥάΠϯ w +40/ܕΛαϙʔτ w ϨϓϦέʔγϣϯͷڧԽ
.Z42-ຊମͰࣗಈϑΣΠϧΦʔόʔΛαϙʔτ 1PTUHSF42-ίϛολ༷ɺ·ͩͰ͔͢ʁ
MySQL 5.7ͱPostgreSQL 9.5 ͦͷଞ w 4:4εΩʔϚΛαϙʔτ w 0/-:@'6--@(3061@#: .Z42- ͕σϑΥϧτ
w Ͱ1BTTXPSEมߋڧ੍͕σϑΥϧτ w ͭͷςʔϒϧʹϚϧντϦΨʔΛαϙʔτ
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42-
MySQL 5.7ͱPostgreSQL 9.5 1PTUHSF42- ˣ ਖ਼౷ͳ3%#ΛΑΓ֦ு͍ͯ͘͠ײ͡
MySQL 5.7ͱPostgreSQL 9.5 .Z42-
MySQL 5.7ͱPostgreSQL 9.5 .Z42- ˣ ਖ਼͍͠3%#ͬΆ͘ͳͬͨ ʢͦͷӨڹͰԼҐޓੑͷແ͍มߋଟ͍ʣ ݩ͕ΏΔ;Θܥա͗ͨͷͰྑ͍ͱࢥ͏
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ.Z42-
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ.Z42- ΑΓେنΞʔΩςΫνϟʹಛԽ͍͖ͯͦ͠͏
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ.Z42- ΑΓେنΞʔΩςΫνϟʹಛԽ͍͖ͯͦ͠͏ ˣ ϥΠόϧ1PTUHSF42-Ͱͳ͘/042-
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ1PTUHSF42-
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ1PTUHSF42- ਖ਼౷3%#ͱͯ͠ਐԽ͍͖ͯͦ͠͏
MySQL 5.7ͱPostgreSQL 9.5 ࠓޙͷ1PTUHSF42- ਖ਼౷3%#ͱͯ͠ਐԽ͍͖ͯͦ͠͏ ˣ ϥΠόϧ.Z42-Ͱͳ͘ɺ༻%#
MySQL 5.7ͱPostgreSQL 9.5 .Z42-ͱ1PTUHSF42-
MySQL 5.7ͱPostgreSQL 9.5 .Z42-ͱ1PTUHSF42- ࠓ·Ͱ͜Ε͔ΒॅΈ͚͕ਐΜͰ͍͘
͋͐͡Μͩ ̍ɹࣗݾհ ̎ɹίϛϡχςΟͷҧ͍ ̏ɹϋϚϦͲ͜ΖͷTips ̐ɹMySQL 5.7ͱPostgreSQL 9.5 ̑ɹ·ͱΊ
·ͱΊ ෳͷબࢶΛΔ
·ͱΊ ෳͷબࢶΛΔ ˣ ධՁ͕࣠૿͑ͯൃ͕͕Δ
·ͱΊ ෳͷબࢶΛΔ ˣ ධՁ͕࣠૿͑ͯൃ͕͕Δ ˣ ઃܭྗ্͕͕Δ
·ͱΊ બࢶ͕૿͑Δ
·ͱΊ બࢶ͕૿͑Δ ˣ ࣄͷ෯͕૿͑Δ
·ͱΊ બࢶ͕૿͑Δ ˣ ࣄͷ෯͕૿͑Δ ˣ .Z42-1PTUHSF42-Θ͔Δਓগͳ͍
·ͱΊ બࢶ͕૿͑Δ ˣ ࣄͷ෯͕૿͑Δ ˣ .Z42-1PTUHSF42-Θ͔Δਓগͳ͍ ࠓޙ3%#ͷ044ར༻૿͑Δͣ
·ͱΊ બࢶ͕૿͑Δ ˣ ࣄͷ෯͕૿͑Δ ˣ .Z42-1PTUHSF42-Θ͔Δਓগͳ͍ ࠓޙ3%#ͷ044ར༻૿͑Δͣ %#ΤϯδχΞͷੜ͖ΓઓུͷҰͭ
·ͱΊ ࠷৽൛ͷௐࠪ
·ͱΊ ࠷৽൛ͷௐࠪ ˣ ίϛϡχςΟΛ্ख͘͏
·ͱΊ ࠷৽൛ͷௐࠪ ˣ ίϛϡχςΟΛ্ख͘͏ ˣ ຊޠใଟ͍
·ͱΊ ࠷৽൛ͷௐࠪ ˣ ίϛϡχςΟΛ্ख͘͏ ˣ ຊޠใଟ͍ ߴԽϝϦοτ͕ͩ ࠓࠔͬͯΔࣄΛղܾͯ͘͠ΕΔࣄଟ͍ ྫɿ1PTUHSF42-ͷ.BSHFจ .Z42-ͷτϦΨʔͳͲ
·ͱΊ ΤϯδχΞͱͯ͠ੜ͖Δʹ
·ͱΊ ΤϯδχΞͱͯ͠ੜ͖Δʹ ˣ 3%#ͷٕज़ͷण໋͍
·ͱΊ ΤϯδχΞͱͯ͠ੜ͖Δʹ ˣ 3%#ͷٕज़ͷण໋͍ ˣ ϕϯμʔϩοΫΠϯ͞Εͳ͍ࣝوॏ
·ͱΊ σʔλͷण໋ίʔυΑΓ͍
·ͱΊ σʔλͷण໋ίʔυΑΓ͍ ˣ ͔ͩΒͦ͜%#ͷࣝେͰ͢
·ͱΊ %#ͷʮ͜ΕΒͳ͔ͬͨʯ
·ͱΊ %#ͷʮ͜ΕΒͳ͔ͬͨʯ ˣ க໋ইʹͳΔ͜ͱଟ͍
·ͱΊ ීஈ͔ΒͷࣝͷΞοϓσʔτΛେʹ
·ͱΊ ීஈ͔ΒͷࣝͷΞοϓσʔτΛେʹ ˣ ൺֱ͢Δ͜ͱͰؔ࿈͚ͨ͠هԱʹͳΔ
·ͱΊ ٕज़ෳֶͼ·͠ΐ͏
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ