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
強いチームと開発生産性
onk
PRO
35
11k
TypeScript、上達の瞬間
sadnessojisan
46
13k
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
430
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
Taming you application's environments
salaboy
0
190
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Building an army of robots
kneath
302
43k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Making Projects Easy
brettharned
115
5.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building Applications with DynamoDB
mza
90
6.1k
The Language of Interfaces
destraynor
154
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Designing for Performance
lara
604
68k
Why Our Code Smells
bkeepers
PRO
334
57k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
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%#ͷٕज़ͷण໋͍ ˣ ϕϯμʔϩοΫΠϯ͞Εͳ͍ࣝوॏ
·ͱΊ σʔλͷण໋ίʔυΑΓ͍
·ͱΊ σʔλͷण໋ίʔυΑΓ͍ ˣ ͔ͩΒͦ͜%#ͷࣝେͰ͢
·ͱΊ %#ͷʮ͜ΕΒͳ͔ͬͨʯ
·ͱΊ %#ͷʮ͜ΕΒͳ͔ͬͨʯ ˣ க໋ইʹͳΔ͜ͱଟ͍
·ͱΊ ීஈ͔ΒͷࣝͷΞοϓσʔτΛେʹ
·ͱΊ ීஈ͔ΒͷࣝͷΞοϓσʔτΛେʹ ˣ ൺֱ͢Δ͜ͱͰؔ࿈͚ͨ͠هԱʹͳΔ
·ͱΊ ٕज़ෳֶͼ·͠ΐ͏
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ