Slide 1

Slide 1 text

PostgreSQLͷ಺෦ߏ଄ ͱ PostgreSQLͷ؂ࢹͷجຊ 1PTUHSF42-ΧϯϑΝϨϯε

Slide 2

Slide 2 text

PostgreSQLͷ಺෦ߏ଄ Φεεϝຊʂ ͚ͩͲͷ࿩

Slide 3

Slide 3 text

PostgreSQLͷ಺෦ߏ଄ ɹQHͷ ೖ໳هࣄ͕͋Δ

Slide 4

Slide 4 text

What is it? ͳͥ؂ࢹʢϞχλϦϯάʣ͕ඞཁ͔

Slide 5

Slide 5 text

What is it? • ͍ͪૣ͘ো֐ൃੜΛ֬ೝͰ͖ΔΑ͏ʹ͢ΔͨΊ • ෮چʹ͍ͪૣ͘औΓֻ͔ΕΔΑ͏ʹ͢ΔͨΊ • ঢ়گͷมԽΛ࣌ܥྻͰ؅ཧ͢Δ͜ͱͰɺΩϟύγςΟ ϓϥϯχϯά΍ো֐ͷ༧ஹͷ೺Ѳʹ໾ཱͯΔͨΊ

Slide 6

Slide 6 text

What is it? αʔϏεΛਖ਼͘͠ӡ༻͢ΔͨΊʹ͸ ඞཁෆՄܽͳࣄʂ

Slide 7

Slide 7 text

What is it? PostgreSQLΛݟΔ

Slide 8

Slide 8 text

What is it? PostgreSQLΛݟΔ ↓ ͦͯ͠஌Δ

Slide 9

Slide 9 text

What is it? ਖ਼͘͠ӡ༻͢ΔͨΊͷҰา໨

Slide 10

Slide 10 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 11

Slide 11 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 12

Slide 12 text

ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ33ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿCustomer Reliability Engineering ॴଐɿגࣜձࣾ ͸ͯͳʢMackerelνʔϜʣ ɹɹɹ೔ຊPostgreSQLϢʔβձ ɹɹɹɹɹɹ ษڧձ୲౰ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

Slide 13

Slide 13 text

ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ33ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿCustomer Reliability Engineering ॴଐɿגࣜձࣾ ͸ͯͳʢMackerelνʔϜʣ ɹɹɹ೔ຊPostgreSQLϢʔβձ ɹɹɹɹɹɹ ษڧձ୲౰ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

Slide 14

Slide 14 text

Mackerel

Slide 15

Slide 15 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 16

Slide 16 text

PostgreSQLͷ಺෦ߏ଄ ԿΛϞχλϦϯά͢Δ͔ʁ

Slide 17

Slide 17 text

PostgreSQLͷ಺෦ߏ଄ ԿΛϞχλϦϯά͢Δ͔ʁ ˣ ಺෦ߏ଄Λ஌Βͳ͍ͱ ஋͕ཧղͰ͖ͳ͍

Slide 18

Slide 18 text

PostgreSQLͷϓϩηε L L E E L X E I N D AE E W W E E

Slide 19

Slide 19 text

ϓϩηε໊ આ໌ Ϛελʔαʔό ࠷ॳʹىಈ͞ΕΔ਌ϓϩηε ϥΠλ ڞ༗όοϑΝͷ಺༰ΛσʔλϑΝΠϧʹॻ͖ग़͢ɻ WALϥΠλ WALόοϑΝͷ಺༰ΛWALϑΝΠϧʹॻ͖ग़͢ɻ νΣοΫϙΠϯλ શͯͷμʔςΟʔϖʔδΛσʔλϑΝΠϧʹॻ͖ग़͢ɻ ࣗಈVACUUMϥϯνϟ ઃఆʹ͕ͨͬͯࣗ͠ಈVACUUMϫʔΧΛىಈ͢Δɻ ࣗಈVACUUMϫʔΧ ࣗಈVACUUMΛ࣮ߦ͢Δɻෳ਺ىಈ͢Δ͜ͱ͕͋Δɻ ౷ܭ৘ใίϨΫλ σʔλϕʔεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใΛऩू͢Δɻ όοΫΤϯυϓϩηε ΫϥΠΞϯτͷ઀ଓཁٻຖʹىಈ͠ɺཁٻʹରͯ͠ॲཧ͢Δɻ ϩΨʔ PostgreSQLͷϩάΛϑΝΠϧ΁ॻ͖ग़͢ɻ ΞʔΧΠό WALϩάΛΞʔΧΠϒ͢Δɻ WALηϯμ ϨϓϦέʔγϣϯ࣌ʹWALΛεϨʔϒαʔόʹసૹ͢Δɻ WALϨγʔό ϨϓϦέʔγϣϯ࣌ʹWALΛϚελʔαʔό͔Βड৴͢Δɻ ओͳϓϩηε܈

Slide 20

Slide 20 text

PostgreSQLͷ಺෦ߏ଄ ओͳϝϞϦ܈ ໊લ આ໌ ڞ༗όοϑΝ (shared_buffers) ςʔϒϧ΍ΠϯσοΫεͷσʔλΛΩϟογϡ͢ΔྖҬͰ͢ɻ WALόοϑΝ (wal_buffers) σΟεΫʹॻ͖ࠐ·Ε͍ͯͳ͍τϥϯβΫγϣϯϩάΛΩϟογϡ͢ΔྖҬͰ͢ɻ ՄࢹੑϚοϓ (Visibility Map) ςʔϒϧͷσʔλ͕ࢀরग़དྷΔ͔൱͔؅ཧ͢Δ৘ใΛѻ͏ྖҬͰ͢ɻVACUUMॲཧͷࡍʹॲཧର৅ͷϖʔ δ͔൑அ͢Δࡍʹར༻͞Ε·͢ɻ·ͨՄࢹੑϚοϓ͸VACUUMॲཧ΍֤ߋ৽ॲཧͷࡍʹߋ৽͞Ε·͢ɻ PostgreSQL 9.2Ҏ߱Ͱ͸ΠϯσοΫεɾΦϯϦʔɾεΩϟϯͱݴ͏ͱͯ΋ߴ଎ͳݕࡧํࣜͷࡍʹ΋ར༻͞ Ε·͢ɻ ۭ͖ྖҬϚοϓ (Free Scan Map) ςʔϒϧ্ͷར༻ՄೳͳྖҬΛࢦࣔ͢͠৘ใΛѻ͏ྖҬͰ͢ɻVACUUMॲཧͷࡍʹશ͘ࢀর͞Ε͍ͯͳ͍ ߦΛ୳ۭ͖ͯ͠ྖҬͱͯ͠࠶ར༻ग़དྷΔঢ়ଶʹ͠·͢ɻͦͷޙɺ௥Ճ΍ߋ৽࣌ʹۭ͖ྖҬϚοϓΛ୳ࡧ ͠ɺۭ͖ྖҬΛ࠶ར༻͠·͢ɻ

Slide 21

Slide 21 text

໊લ આ໌ σʔλϑΝΠϧ ςʔϒϧσʔλͷ࣮ମ͕อଘ͞ΕΔϑΝΠϧͰ͢ɻςʔϒϧϑΝΠϧ͸ෳ਺ͷ8192όΠτͷϖʔδ (OracleDBͰ͸ϒϩοΫ)ʹΑͬͯߏ੒͞Ε·͢ɻ ̍Fileͷ࠷େ͸1GBͰ͢ɻ INDEXϑΝΠϧ INDEX৘ใ͕อଘ͞ΕΔϑΝΠϧͰ͢ɻςʔϒϧϑΝΠϧͱಉ༷ʹෳ਺ͷ8192όΠτͷϖʔδ(OracleDB Ͱ͸ϒϩοΫ)ʹΑͬͯߏ੒͞Ε·͢ɻ WALϑΝΠϧ Write Ahead LoggingͷུͰτϥϯβΫγϣϯϩάΛPostgreSQLͰ͸WALͱݺͼ·͢ɻߋ৽ʹؔΘΔ৘ใ ΛهԱ͢Δ͜ͱͰσʔλϕʔεͷӬଓੑͷอূΛߦ͍ͬͯ·͢ɻpg_xlogʢPostgreSQL 10͔Β͸pg_walʣ σΟϨΫτϦ഑Լʹอଘ͞Εɺ16MBͷݻఆαΠζͰ࡞੒͞Ε·͢ɻ PostgreSQLͷ಺෦ߏ଄ ओͳϑΝΠϧ܈

Slide 22

Slide 22 text

όοΫΤϯυϓϩηε PostgreSQLͷϝϞϦ όοΫΤϯυϓϩηε ϫʔΫϝϞϦ ϫʔΫϝϞϦ ڞ༗όοϑΝ 8"-όοϑΝ 04ͷόοϑΝΩϟογϡ σʔλϑΝΠϧ 8"- %# σΟεΫྖҬ ϝϞϦྖҬ ϓϩηεྖҬ

Slide 23

Slide 23 text

PostgreSQLͷσʔλ %#ྖҬ 8"-ྖҬ ΞʔΧΠϒ 8"-ྖҬ σΟεΫྖҬ ςʔϒϧϑΝΠϧ */%&9ϑΝΠϧ 8"- ΞʔΧΠϒ ϑΝΠϧ 7. '4.

Slide 24

Slide 24 text

PostgreSQLͷσʔλߏ଄ (#ͷςʔϒϧ ςʔϒϧϑΝΠϧ (# 7. '4. ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ộ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ộ ߦσʔλ ߦσʔλ ςʔϒϧϑΝΠϧ (#

Slide 25

Slide 25 text

PostgreSQLͷσʔλߏ଄ (#ͷςʔϒϧ ςʔϒϧϑΝΠϧ (# 7. ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ộ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ộ ߦσʔλ ߦσʔλ ςʔϒϧϑΝΠϧ (# ςʔϒϧͷϖʔδϔομ͸ CZUFݻఆ '4.

Slide 26

Slide 26 text

PostgreSQLͷσʔλߏ଄ (#ͷςʔϒϧ ςʔϒϧϑΝΠϧ (# 7. ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ộ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ộ ߦσʔλ ߦσʔλ ΞΠςϜϙΠϯλ ߦϔομ ͸CZUF ςʔϒϧϑΝΠϧ (# '4.

Slide 27

Slide 27 text

PostgreSQLͷσʔλߏ଄ (#ͷςʔϒϧ ςʔϒϧϑΝΠϧ (# 7. ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ,#ϖʔδ ộ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ộ ߦσʔλ ߦσʔλ ςʔϒϧϑΝΠϧ (# ࣮ࡍͷϨίʔυͷαΠζ '4.

Slide 28

Slide 28 text

PostgreSQLͷߦσʔλߏ଄ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ộ ߦσʔλ ߦσʔλ JE ໊લ ࡞੒೔࣌ IPHF 'VHB 'PP #BS JOU 5FYU UJNFTUBNQ CZUF CZUFจࣈྻͷCZUF CZUF

Slide 29

Slide 29 text

PostgreSQLͷINDEXσʔλߏ଄ ϖʔδϔομ ϊʔυϔομ ϊʔυϔομ ộ */%&9ΤϯτϦ */%&9ΤϯτϦ JE ໊લ ࡞੒೔࣌ IPHF 'VHB 'PP #BS JOU CZUF

Slide 30

Slide 30 text

PostgreSQLͷINDEXσʔλߏ଄ ϖʔδϔομ ϊʔυϔομ ϊʔυϔομ ộ */%&9ΤϯτϦ */%&9ΤϯτϦ JE ໊લ ࡞੒೔࣌ IPHF 'VHB 'PP #BS JOU CZUF ओΩʔͷ*/%&9ͷ৔߹ JEྻͷ஋Λ֤*/%&9ΤϯτϦ ʹอ࣋͢Δ

Slide 31

Slide 31 text

PostgreSQLͷINDEXσʔλߏ଄ ϖʔδϔομ ϊʔυϔομ ϊʔυϔομ ộ */%&9ΤϯτϦ */%&9ΤϯτϦ JE ໊લ ࡞੒೔࣌ IPHF 'VHB 'PP #BS JOU CZUF ϊʔυϔομ͸CZUF ϖʔδϔομͷݻఆ͸CZUF

Slide 32

Slide 32 text

PostgreSQLͷσʔλ %#ྖҬ 8"-ྖҬ ΞʔΧΠϒ 8"-ྖҬ σΟεΫྖҬ ςʔϒϧϑΝΠϧ */%&9ϑΝΠϧ 8"- ΞʔΧΠϒ ϑΝΠϧ 7. '4. ௨ৗ͸ͭ.#ͷ8"-ηάϝϯτ ϑΝΠϧΛ॥؀ར༻ ෆཁͳ8"-͸ࣗಈతʹॳظԽ͞ΕΔ ʢNBY@XBM@TJ[FͷઃఆˡҎ߱ʣ

Slide 33

Slide 33 text

PostgreSQLͷϓϩηε L L E E L X E I N D AE E W W E E

Slide 34

Slide 34 text

PostgreSQLͷσʔλ %#ྖҬ 8"-ྖҬ ΞʔΧΠϒ 8"-ྖҬ σΟεΫྖҬ ςʔϒϧϑΝΠϧ */%&9ϑΝΠϧ 8"- ΞʔΧΠϒ ϑΝΠϧ 7. '4. ΞʔΧΠϒϞʔυΛ0/ʹ͢Δͱ8"- ͷফࣦΛ๷͙ͨΊʹຊདྷ॥؀͢Δ8"- Λ࢒͓ͯ͘͠

Slide 35

Slide 35 text

PostgreSQLͷ಺෦ߏ଄ ԿΛϞχλϦϯά͢Δ͔ʁ

Slide 36

Slide 36 text

PostgreSQLͷ಺෦ߏ଄ ԿΛϞχλϦϯά͢Δ͔ʁ ˣ 42-ͷྲྀΕΛ஌Βͳ͍ͱ Կ͕ى͍ͬͯ͜Δ͔Θ͔Βͳ͍

Slide 37

Slide 37 text

PostgreSQLͷ಺෦ߏ଄ 2VFSZͷड৴ ߏจղੳ ॻ͖׵͑ ࣮ߦܭըੜ੒࠷దԽ ࣮ߦ ݁Ռૹ৴ 1BSTFS 42-ͷߏจղੳɾจ๏Τϥʔݕग़ɾߏจ໦ͷੜ੒ 3FXSJUFS 7JFXɾ3VMFʹجͮ͘ߏจ໦ͷॻ͖׵͑ 1MBOOFS0QUJNBJ[FS ࣮ߦܭըͷੜ੒౷ܭ৘ใͳͲΛར༻ͨ͠࠷దԽ &YFDVUPS ࣮ߦܭըͷج͍ͮͨ2VFSZͷ࣮ߦɾ8"-ͷ௥هͳͲ 42-จͷॲཧ͞ΕΔྲྀΕ

Slide 38

Slide 38 text

PostgreSQLͷ಺෦ߏ଄ '30.۟ 0/۟ +0*/۟ 8)&3&۟ (3061#:۟ )"7*/(۟ 4&-&$5۟ %*45*/$5۟ 03%&3#:۟ -*.*5۟ 42-จͷධՁ͞ΕΔॱ IUUQTXXXQPTUHSFTRMKQEPDVNFOUIUNMTRMTFMFDUIUNM

Slide 39

Slide 39 text

PostgreSQLͷ಺෦ߏ଄ '30.۟ 0/۟ +0*/۟ 8)&3&۟ (3061#:۟ )"7*/(۟ 4&-&$5۟ %*45*/$5۟ 03%&3#:۟ -*.*5۟ 42-จͷධՁ͞ΕΔॱ IUUQTXXXQPTUHSFTRMKQEPDVNFOUIUNMTRMTFMFDUIUNM ͲΕ͘Β͍ͷσʔλΛѻ͏͔ ೗ԿʹσʔλΛߜΓࠐΉ͔

Slide 40

Slide 40 text

PostgreSQLͷ಺෦ߏ଄ 1PTUHSF42-͸௥هܕ

Slide 41

Slide 41 text

PostgreSQLͷ಺෦ߏ଄ 1 2 3 1 3 2 PostgreSQL(

Slide 42

Slide 42 text

PostgreSQLͷ಺෦ߏ଄ 1 2 3 1 3 2 2 PostgreSQL(

Slide 43

Slide 43 text

PostgreSQLͷ಺෦ߏ଄ 1 2 3 1 3 2 2 PostgreSQL( ͜ͷ࢒ͬͨچϨίʔυ Λ៉ྷ͢Δͷ͕7"$66.

Slide 44

Slide 44 text

PostgreSQLͷ಺෦ߏ଄ 1PTUHSF42-͸௥هܕ

Slide 45

Slide 45 text

PostgreSQLͷ಺෦ߏ଄ 1PTUHSF42-͸௥هܕ ˣ )05 )FBQ0OMZ5VQMF ͱ '*--'"$503

Slide 46

Slide 46 text

HOTͱFILLFACTOR ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ߦσʔλ ߦσʔλ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ` ߦσʔλ` ߦσʔλ ߦσʔλ ߦσʔλΛ ߋ৽

Slide 47

Slide 47 text

HOTͱFILLFACTOR ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ߦσʔλ ߦσʔλ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ` ߦσʔλ` ߦσʔλ ߦσʔλ ߦσʔλΛ ߋ৽ ͜ͷۭ͖ྖҬΛ؅ཧ͢Δ࢓૊Έ͕ '*--'"$503 ςʔϒϧϑΝΠϧͷσϑΥϧτ͸ ͳͷͰۭ͖ྖҬΛ࡞Βͳ͍

Slide 48

Slide 48 text

HOTͱFILLFACTOR ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ߦσʔλ ߦσʔλ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ` ߦσʔλ` ߦσʔλ ߦσʔλ ߦσʔλΛ ߋ৽ ݕࡧ࣌ͷಈ࡞ ΞΠςϜϙΠϯλΛ֬ೝ ΞΠςϜϙΠϯλ`Λ֬ೝ ߦσʔλ`Λऔಘ

Slide 49

Slide 49 text

HOTͱFILLFACTOR ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ߦσʔλ ߦσʔλ ϖʔδϔομ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ ΞΠςϜϙΠϯλ` ߦσʔλ` ߦσʔλ ߦσʔλ ߦσʔλΛ ߋ৽ ۭ͖ྖҬΛ࢖͑Δͱ*/%&9Λߋ ৽͢Δ͜ͱແ͘σʔλΛߋ৽ ݹ͍Ϩίʔυ͸7"$66.Λ଴ ͨͣʹ࠶ར༻Մೳ

Slide 50

Slide 50 text

HOTͱFILLFACTOR )05ߋ৽͕ར༻Ͱ͖Δ৚݅ w ಉҰϖʔδ಺ʹߋ৽ޙͷσʔλΛ อଘͰ͖Δ w *OEFYྻΛߋ৽͠ͳ͍

Slide 51

Slide 51 text

PostgreSQLͷ಺෦ߏ଄ 1PTUHSF42-ͷ಺෦ߏ଄Λ஌Δ

Slide 52

Slide 52 text

PostgreSQLͷ಺෦ߏ଄ 1PTUHSF42-ͷ಺෦ߏ଄Λ஌Δ ˣ ϞχλϦϯάͷצॴ͕ݟ͑ͯ͘Δ

Slide 53

Slide 53 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 54

Slide 54 text

PostgreSQLͷ౷ܭ৘ใ ౷ܭ৘ใίϨΫλ͕ αʔόͷ׆ಈঢ়گʹؔ͢Δ৘ใΛऩू

Slide 55

Slide 55 text

PostgreSQLͷ಺෦ߏ଄ L L E E L X E I N D AE E W W E E

Slide 56

Slide 56 text

PostgreSQLͷ౷ܭ৘ใ αʔόͷ׆ಈঢ়گʹؔ͢Δ৘ใ

Slide 57

Slide 57 text

PostgreSQLͷ౷ܭ৘ใ αʔόͷ׆ಈঢ়گʹؔ͢Δ৘ใ ˣ ౷ܭ৘ใ

Slide 58

Slide 58 text

PostgreSQLͷ౷ܭ৘ใ ౷ܭ৘ใ ެࣜυΩϡϝϯτ IUUQTXXXQPTUHSFTRMKQEPDVNFOUIUNMNPOJUPSJOHTUBUTIUNM

Slide 59

Slide 59 text

PostgreSQLͷ౷ܭ৘ใ QPTUHSFTRMDPOGͰ QH@TUBU@TUBUFNFOUTΛ༗ޮʹ͢Δ

Slide 60

Slide 60 text

PostgreSQLͷ౷ܭ৘ใ QPTUHSFTRMDPOGͰ QH@TUBU@TUBUFNFOUTΛ༗ޮʹ͢Δ 42-จͷ࣮ߦ࣌ؒɺ࣮ߦճ਺ɺऔಘͨ͠ʢ·ͨ͸ߋ৽ͨ͠ʣ Ϩίʔυ਺ͳͲ͕อଘ͞ΕΔ

Slide 61

Slide 61 text

PostgreSQLͷ౷ܭ৘ใ ౷ܭ৘ใΛ·ͱΊͨศརͳ7JFX

Slide 62

Slide 62 text

౷ܭ৘ใͷओͳView 7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ

Slide 63

Slide 63 text

౷ܭ৘ใͷओͳView 7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ νΣοΫϙΠϯτͷ࣮ߦճ਺΍࣮ߦ࣌ؒͳͲ͕ݟΕΔ ߋ৽͕ܹ͍͠৔߹ʹ͸νΣοΫϙΠϯτ͕ॏཁͳՕॴʹͳΔ

Slide 64

Slide 64 text

౷ܭ৘ใͷओͳView 7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ࠓ·͞ʹ࣮ߦ͞Ε͍ͯΔ42-ͳͲ͕Θ͔Δ 2VFSZ͕͍ࢗͬͯ͞Δͱ͖΍Ұ෦ͷ8FCαʔόͷΞΫηε͕ॏ͍౳͕ݟ͑ͯ͘Δ

Slide 65

Slide 65 text

౷ܭ৘ใͷओͳView 7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ σʔλϕʔεશମͷࢀরɾ௥Ճɾߋ৽ɾ࡟আճ਺ͳͲ͕ݟΕΔ σουϩοΫͷճ਺΍Ұ࣌ϑΝΠϧͷ࡞੒ճ਺΋ݟΕΔͷͰʮٸʹ%#͕ॏ͘ͳΔ લʹؾ෇͘ʯͨΊʹܧଓతʹϞχλϦϯά͕େࣄ

Slide 66

Slide 66 text

7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ౷ܭ৘ใͷओͳView QH@TUBU@EBUBCBTFΛΑΓৄࡉʹςʔϒϧ୯ҐͰݟΕΔ༷ʹͳͬͨ7JFX ߋʹ)05ͷߋ৽ߦ਺΍ෆཁͳλϓϧɺ7"$66.ͷ࣮ߦճ਺ͳͲ͕ݟΕΔ

Slide 67

Slide 67 text

7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ౷ܭ৘ใͷओͳView QH@TUBU@VTFS@UBCMFTʹࣅ͍ͯΔ͕τϥϯβΫγϣϯதͷσʔλͷΈ͕දࣔ͞ΕΔ QH@TUBU@YBDU@VTFS@UBCMFTʹදࣔ͞Ε͍ͯΔ৔߹͸ɺQH@TUBU@VTFS@UBCMFTʹ͸ ؚ·Ε͍ͯͳ͍

Slide 68

Slide 68 text

7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ౷ܭ৘ใͷओͳView */%&9ͷར༻ঢ়گ͕Θ͔Δ7JFX */%&9Λར༻ͨ͠ճ਺ɺ*/%&9ʹؚ·ΕΔΧϥϜͷར༻ݸ਺ɺ*/%&9Λར༻ͯ͠ औΓग़ͨ͠ߦ਺ͳͲ͕ݟΕΔ *OEFY0OMZ4DBO͕༗ޮ׆༻͞Ε͍ͯΔ৔߹͸JEY@UVQ@SFBEʹରͯ͠JEY@UVQ@GFUDI ͕গͳ͘ͳΔɻ 8)&3&ͷൣғ͕޿͍৔߹ͳͲ͸JEY@UVQ@GFUDIͷ૿ՃྔΛݟΔ͜ͱͰ܏޲Λ༧ଌ ͢Δ͜ͱ͕Ͱ͖Δ

Slide 69

Slide 69 text

7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ౷ܭ৘ใͷओͳView ςʔϒϧ୯Ґͷ*0͕Θ͔ΔͷͰόοϑΝΩϟογϡͷঢ়گΛܭࢉ͢Δ͜ͱ͕Ͱ͖Δ IFBQ@CMLT@SFBE͕IFBQ@CMLT@IJUΑΓ΋͔ͳΓগͳ͍ͷͰ͋Ε͹΄΅ΧʔωϧΛݺͼ ग़͢͜ͱແ݁͘ՌΛฦͤͯΔͷͰૣ͍͸ͣɻ 50"45ͷঢ়گ΋ݟΕΔͨΊɺେ͖ͳσʔλΛѻ͍ͬͯΔςʔϒϧͰ͸ཁ؂ࢹ

Slide 70

Slide 70 text

7JFX໊ આ໌ QH@TUBU@CHXSJUFS όοΫάϥ΢ϯυϥΠλϓϩηεͷ׆ಈঢ়گʹؔ͢Δ౷ܭ৘ใ QH@TUBU@BDUJWJUZ ઀ଓ͞Ε͍ͯΔϓϩηεͷݱࡏͷ׆ಈঢ়گʹؔ࿈ͨ͠৘ใ QH@TUBU@EBUBCBTF σʔλϕʔε୯Ґͷશମͷ৘ใ QH@TUBU@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢ΔΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBU@YBDU@VTFS@UBCMFT ݱࡏͷτϥϯβΫγϣϯதͷΞΫηεʹؔ͢Δ৘ใ QH@TUBU@VTFS@JOEFYFT ಛఆͷΠϯσοΫε΁ͷΞΫηεʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@UBCMFT ಛఆͷςʔϒϧʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ QH@TUBUJP@VTFS@JOEFYFT ಛఆͷΠϯσοΫεʹର͢Δ*0ʹؔ͢Δ౷ܭ৘ใ ౷ܭ৘ใͷओͳView QH@TUBUJP@VTFS@UBCMFTͷ*/%&9൛ όοϑΝΩϟογϡͷώοτ཰ͳͲܭࢉͰ͖Δ

Slide 71

Slide 71 text

PostgreSQLͷ౷ܭ৘ใ ౷ܭ৘ใʹ͸42-ͰΞΫηεͰ͖Δ

Slide 72

Slide 72 text

PostgreSQLͷ౷ܭ৘ใ ౷ܭ৘ใͷ׆༻ͷྫ w ൃߦ͞Ε͍ͯΔ2VFSZ w ϩοΫͷ಺༰ w */%&9ͷར༻ঢ়گ w νΣοΫϙΠϯτͷॲཧঢ়گʜFUD

Slide 73

Slide 73 text

εϧʔϓοτΤϥʔͷ֬ೝ =# SELECT datname, xact_commit, xact_rollback FROM pg_stat_database; datname | xact_commit | xact_rollback -----------+-------------+--------------- template1 | 0 | 0 template0 | 0 | 0 postgres | 101216 | 1

Slide 74

Slide 74 text

Ωϟογϡώοτ཰ͷ֬ೝ =# SELECT datname, round(blks_hit*100/(blks_hit+blks_read), 2) AS cache_hit_ratio FROM pg_stat_database WHERE blks_read > 0; datname | cache_hit_ratio ----------+----------------- postgres | 99.00 ※ blks_hit+blks_read ʹ஫ҙ

Slide 75

Slide 75 text

ςʔϒϧͷ Ωϟογϡώοτ཰ͷ֬ೝ =# SELECT relname, round(heap_blks_hit*100/(heap_blks_hit+heap_blks_read), 2) AS cache_hit_ratio FROM pg_statio_user_tables WHERE heap_blks_read > 0 ORDER BY cache_hit_ratio; relname | cache_hit_ratio ------------------+----------------- pgbench_accounts | 97.00 pgbench_tellers | 99.00 pgbench_history | 99.00 pgbench_branches | 99.00

Slide 76

Slide 76 text

ΠϯσοΫεͷ Ωϟογϡώοτ཰ͷ֬ೝ =# SELECT relname, indexrelname, round(idx_blks_hit*100/(idx_blks_hit+idx_blks_read), 2) AS cache_hit_ratio FROM pg_statio_user_indexes WHERE idx_blks_read > 0 ORDER BY cache_hit_ratio; relname | indexrelname | cache_hit_ratio ------------------+-----------------------+------------------ pgbench_tellers | pgbench_tellers_pkey | 90.00 pgbench_branches | pgbench_branches_pkey | 99.00 pgbench_accounts | pgbench_accounts_pkey | 99.00

Slide 77

Slide 77 text

දεΩϟϯ͋ͨΓͷಡΈऔΓߦ਺ͷ֬ೝ =# SELECT relname, seq_scan, seq_tup_read, seq_tup_read/seq_scan AS tup_per_read FROM pg_stat_user_tables WHERE seq_scan > 0 ORDER BY tup_per_read DESC; relname | seq_scan | seq_tup_read | tup_per_read ------------------+----------+--------------+-------------- pgbench_accounts | 1 | 100000 | 100000 pgbench_tellers | 153613 | 1000010 | 6 pgbench_branches | 35659 | 16461 | 0

Slide 78

Slide 78 text

)05ߋ৽ͷൺ཰ͷ֬ೝ =# SELECT relname, n_tup_upd, n_tup_hot_upd, round(n_tup_hot_upd*100/n_tup_upd, 2) AS hot_upd_ratio FROM pg_stat_user_tables WHERE n_tup_upd > 0 ORDER BY hot_upd_ratio; relname | n_tup_upd | n_tup_hot_upd | hot_upd_ratio ------------------+-----------+---------------+--------------- pgbench_accounts | 100000 | 96079 | 96.00 pgbench_tellers | 100000 | 99921 | 99.00 pgbench_branches | 100000 | 99548 | 99.00

Slide 79

Slide 79 text

ϩοΫ଴ͪॲཧͷ֬ೝ =# SELECT l.locktype, c.relname, l.pid, l.mode, substring(a.current_query, 1, 6) AS query, (current_timestamp - xact_start)::interval(3) AS duration FROM pg_locks l LEFT OUTER JOIN pg_stat_activity a ON l.pid = a. procpid LEFT OUTER JOIN pg_class c ON l.relation = c.oid WHERE NOT l.granted ORDER BY l.pid; locktype | relname | pid | mode | query | duration ---------------+----------+------+---------------+--------+-------------- tuple | tellers | 2700 | ExclusiveLock | UPDATE | 00:00:00.013 transactionid | | 2701 | ShareLock | INSERT | 00:00:00.004 transactionid | | 2702 | ShareLock | UPDATE | 00:00:00.014 tuple | tellers | 2703 | ExclusiveLock | UPDATE | 00:00:00.004 tuple | tellers | 2704 | ExclusiveLock | UPDATE | 00:00:00.009 tuple | branches | 2705 | ExclusiveLock | UPDATE | 00:00:00.001 transactionid | | 2706 | ShareLock | UPDATE | 00:00:00.001 transactionid | | 2707 | ShareLock | UPDATE | 00:00:00.017 transactionid | | 2708 | ShareLock | UPDATE | 00:00:00.007

Slide 80

Slide 80 text

PostgreSQLͷ౷ܭ৘ใ -FUT1PTUHSFT lՔಈ౷ܭ৘ใΛ׆༻͠Α͏z IUUQTMFUTQPTUHSFTRMKQEPDVNFOUTUFDIOJDBMTUBUJTUJDT

Slide 81

Slide 81 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 82

Slide 82 text

PostgreSQLͷϞχλϦϯά ౷ܭ৘ใΛ࢖͏ͱ 1PTUHSF42-ΛϞχλϦϯάͰ͖Δ

Slide 83

Slide 83 text

PostgreSQLͷϞχλϦϯά ͔͠͠ྺ࢙Λ࣋ͨͳ͍

Slide 84

Slide 84 text

PostgreSQLͷϞχλϦϯά ͔͠͠ྺ࢙Λ࣋ͨͳ͍ ˣ ࣌ܥྻ%#ʹอଘͯ͠ՄࢹԽ

Slide 85

Slide 85 text

PostgreSQLͷϞχλϦϯά

Slide 86

Slide 86 text

PostgreSQLͷϞχλϦϯά ߲໨ ࢮ׆؂ࢹ νΣοΫ؂ࢹ Ϧιʔε؂ࢹ ϓϩηε؂ࢹ ˓ ˓ ˓ ༰ྔ؂ࢹ ☓ ˓ ˓ ϩά؂ࢹ ☓ ˓ ˓ ύϑΥʔϚϯε ؂ࢹ ☓ ☓ ˓

Slide 87

Slide 87 text

PostgreSQLͷϞχλϦϯά ߲໨ ࢮ׆؂ࢹ νΣοΫ؂ࢹ Ϧιʔε؂ࢹ ϓϩηε؂ࢹ ˓ ˓ ˓ ༰ྔ؂ࢹ ☓ ˓ ˓ ϩά؂ࢹ ☓ ˓ ˓ ύϑΥʔϚϯε ؂ࢹ ☓ ☓ ˓ ΋ͬͱ΋γϯϓϧ QH@JTSFBEZͰྑ͍ ͔͠͠αʔϏε͕མͪΔ·ͰΘ͔Βͳ͍

Slide 88

Slide 88 text

PostgreSQLͷϞχλϦϯά ߲໨ ࢮ׆؂ࢹ νΣοΫ؂ࢹ Ϧιʔε؂ࢹ ϓϩηε؂ࢹ ˓ ˓ ˓ ༰ྔ؂ࢹ ☓ ˓ ˓ ϩά؂ࢹ ☓ ˓ ˓ ύϑΥʔϚϯε ؂ࢹ ☓ ☓ ˓ ঢ়ଶͷมԽ͕Θ͔Δ ͔͠͠มԽͷࠩ෼͕ͳ͍ͨΊ ༧ஹʹ͸ؾ෇͖ʹ͍͘

Slide 89

Slide 89 text

PostgreSQLͷϞχλϦϯά ߲໨ ࢮ׆؂ࢹ νΣοΫ؂ࢹ Ϧιʔε؂ࢹ ϓϩηε؂ࢹ ˓ ˓ ˓ ༰ྔ؂ࢹ ☓ ˓ ˓ ϩά؂ࢹ ☓ ˓ ˓ ύϑΥʔϚϯε ؂ࢹ ☓ ☓ ˓ աڈͱࠓͷࠩ෼Λൺֱ͢Δ͜ͱͰݱঢ়Λ ΑΓਖ਼͘͠೺ѲͰ͖Δ άϥϑͰՄࢹԽ͢Δ͜ͱͰΘ͔Γ΍͍͢

Slide 90

Slide 90 text

PostgreSQLͷϞχλϦϯά 1PTUHSF42-Λӡ༻͢ΔͨΊͷ؂ࢹ

Slide 91

Slide 91 text

ϞχλϦϯάͷର৅ w σΟεΫ༰ྔ؂ࢹ w 7"$66.؂ࢹ w ϨϓϦέʔγϣϯ؂ࢹ w αʔόϩά؂ࢹ PostgreSQLͷϞχλϦϯά

Slide 92

Slide 92 text

ϞχλϦϯάͷର৅ w σΟεΫ༰ྔ؂ࢹ w 7"$66.؂ࢹ w ϨϓϦέʔγϣϯ؂ࢹ w αʔόϩά؂ࢹ PostgreSQLͷϞχλϦϯά σΟεΫ༰ྔɺσʔλϕʔεɺΦϒδΣΫτ౳ͷ αΠζΛ؂ࢹ

Slide 93

Slide 93 text

σΟεΫ༰ྔ؂ࢹ w σΟεΫ༰ྔ͸04ίϚϯυ EGɺEVrTͳͲ Ͱ؂ࢹ w ಛʹҎԼͷྖҬʹ஫ҙ w σʔλϑΝΠϧ w 8"-ϑΝΠϧ w ΞʔΧΠϒྖҬ ϩʔΧϧσΟεΫʹ഑ஔ͍ͯ͠Δ৔߹ w σʔλϕʔε΍ΦϒδΣΫταΠζ͸ؔ਺Ͱ֬ೝ w QH@EBUBCBTF@TJ[F bEBUBCBTF` w QH@SFMBUJPO@TJ[F bPCKFDU` w QH@UPUBM@SFMBUJPO@TJ[F bUBCMF`

Slide 94

Slide 94 text

PostgreSQLͷσʔλ %#ྖҬ 8"-ྖҬ ΞʔΧΠϒ 8"-ྖҬ σΟεΫྖҬ ςʔϒϧϑΝΠϧ */%&9ϑΝΠϧ 8"- ΞʔΧΠϒ ϑΝΠϧ 7. '4. EG΍EVTͰ֬ೝ͢Δ ΞʔΧΠϒϑΝΠϧ͸όοΫΞοϓͷ΍Γํ ΍ස౓ʹΑͬͯอଘ͢Δର৅͕͔ΘΔͷͰ ઃܭ࣌ʹ͔ͬ͠Γͱݟੵ΋Δࣄ

Slide 95

Slide 95 text

PostgreSQLͷσʔλ %#ྖҬ 8"-ྖҬ ΞʔΧΠϒ 8"-ྖҬ σΟεΫྖҬ ςʔϒϧϑΝΠϧ */%&9ϑΝΠϧ 8"- ΞʔΧΠϒ ϑΝΠϧ 7. '4. σʔλϕʔε΍ΦϒδΣΫταΠζ͸ؔ਺Ͱ֬ೝ QH@SFMBUJPO@TJ[F ʹ͸*/%&9໊΋ࢦఆͰ͖Δ QH@UPUBM@SFMBUJPO@TJ[F ʹ͸*/%&9ͳͲͷαΠζ΋ؚ·ΕΔ

Slide 96

Slide 96 text

ϞχλϦϯάͷର৅ w σΟεΫ༰ྔ؂ࢹ w 7"$66.؂ࢹ w ϨϓϦέʔγϣϯ؂ࢹ w αʔόϩά؂ࢹ PostgreSQLͷϞχλϦϯά ౷ܭ৘ใ͔Β࣮ߦঢ়ଶΛ؂ࢹ͢Δ

Slide 97

Slide 97 text

VACUUMͷඞཁੑ 7"$66.ͱ7"$66.'6--͕͋Δ w 7"$66.Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞Εͨߦͷ࠶ར༻ w τϥϯβΫγϣϯ*%पճͷճආ w 7"$66.'6--Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞ΕͨߦΛ੾Γ٧ΊΔ w σΟεΫͷ࢖༻ྔΛ෺ཧతʹॖখ͢Δ

Slide 98

Slide 98 text

7"$66.ͱ7"$66.'6--͕͋Δ w 7"$66.Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞Εͨߦͷ࠶ར༻ w τϥϯβΫγϣϯ*%पճͷճආ w 7"$66.'6--Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞ΕͨߦΛ੾Γ٧ΊΔ w σΟεΫͷ࢖༻ྔΛ෺ཧతʹॖখ͢Δ VACUUMͷඞཁੑ QH@TUBU@VTFS@UBCMFTͳͲΛ׆༻ͯ͠ਖ਼࣮͘͠ߦ ͞Ε͍ͯΔࣄΛ֬ೝ͢Δ

Slide 99

Slide 99 text

7"$66.ͱ7"$66.'6--͕͋Δ w 7"$66.Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞Εͨߦͷ࠶ར༻ w τϥϯβΫγϣϯ*%पճͷճආ w 7"$66.'6--Λ࣮ߦ͢Δ໨త w ߋ৽࡟আ͞ΕͨߦΛ੾Γ٧ΊΔ w σΟεΫͷ࢖༻ྔΛ෺ཧతʹॖখ͢Δ VACUUMͷඞཁੑ QH@TUBU@VTFS@UBCMFTͳͲΛ׆༻ͯ͠ਖ਼࣮͘͠ߦ ͞Ε͍ͯΔࣄΛ֬ೝ͢Δ 7"$66.࣮ߦ࣌͸ύϑΥʔϚϯεྼԽͷτϦΨʔ ʹͳΓ΍͍͢ͷͰ࣮ߦλΠϛϯάΛอଘ͢Δ

Slide 100

Slide 100 text

ϞχλϦϯάͷର৅ w σΟεΫ༰ྔ؂ࢹ w 7"$66.؂ࢹ w ϨϓϦέʔγϣϯ؂ࢹ w αʔόϩά؂ࢹ PostgreSQLͷϞχλϦϯά 8"-ͷసૹঢ়گ΍λΠϜϥΠϯͳͲΛ֬ೝ͢Δ ࠓ೔͸ϨϓϦέʔγϣϯͷηογϣϯ͕͋ΔͷͰׂѪ

Slide 101

Slide 101 text

ϞχλϦϯάͷର৅ w σΟεΫ༰ྔ؂ࢹ w 7"$66.؂ࢹ w ϨϓϦέʔγϣϯ؂ࢹ w αʔόϩά؂ࢹ PostgreSQLͷϞχλϦϯά Τϥʔϩάͷग़ྗ݁ՌͳͲΛ؂ࢹ͢Δ

Slide 102

Slide 102 text

PostgreSQLͷϩά MPH@NJO@NFTTBHFTͷ ΤϥʔϨϕϧΛࢦఆ͢Δ

Slide 103

Slide 103 text

PostgreSQLͷϩά ਂࠁ౓ ࢖༻ํ๏ TZTMPH %(%( ։ൃऀ͕࢖༻͢Δ࿈ଓత͔ͭΑΓৄࡉͳ৘ใΛఏڙ͠·͢ɻ %( */'0 7"$66.7&3#04&ͷग़ྗͳͲͷɺϢʔβʹΑͬͯ҉໧తʹཁٻ ͞Εͨ৘ใΛఏڙ͠·͢ɻ */'0 /05*$& ௕͍ࣝผࢠͷ੾Γ٧Ίʹؔ͢Δ஫ҙͳͲɺϢʔβͷิॿʹͳΔ৘ใ Λఏڙ͠·͢ɻ /05*$& 8"3/*/( τϥϯβΫγϣϯϒϩοΫ֎Ͱͷ$0..*5ͷ༷ͳɺϢʔβ΁ͷܯࠂ Λఏڙ͠·͢ɻ /05*$& &3303 ݱࡏͷίϚϯυΛதஅͤ͞ΔݪҼͱͳͬͨΤϥʔΛใࠂ͠·͢ɻ 8"3/*/( -0( νΣοΫϙΠϯτͷ׆ಈͷ༷ͳɺ؅ཧऀʹؔ৺ͷ͋Δ৘ใΛใࠂ͠ ·͢ɻ */'0 '"5"- ݱࡏͷηογϣϯΛதஅͤ͞ΔݪҼͱͳͬͨΤϥʔΛใࠂ͠·͢ɻ &33 1"/*$ શͯͷσʔλϕʔεηογϣϯΛதஅͤ͞ΔݪҼͱͳͬͨΤϥʔΛใ ࠂ͠·͢ɻ $3*5

Slide 104

Slide 104 text

PostgreSQLͷϩά ᮢ஋Λ௒͑ͨ42-ͷ؂ࢹ ߲໨໊ ༻్ MPH@NJO@FSSPS@TUBUFNFOU ࢦఆͷΤϥʔϨϕϧʹ֘౰͢Δ42-Λه࿥͢Δ MPH@NJO@EVSBUJPO@TUBUFNFOU ࢦఆͨ͠ϛϦඵҎ্ͷ࣮ߦ࣌ؒͷ42-Λه࿥͢Δ MPH@MPDL@XBJUT ϩοΫ֫ಘʹཁ͕ͨ࣌ؒ͠λΠϜΞ΢τͨ͠42- Λه࿥͢Δ

Slide 105

Slide 105 text

PostgreSQLͷϞχλϦϯά ͜ΕΒΛՄࢹԽͯ͠ 1PTUHSF42-ͷৼΔ෣͍Λ஌Δ

Slide 106

Slide 106 text

PostgreSQLͷϞχλϦϯά ՄࢹԽͷͨΊͷπʔϧ w .BDLFSFMQMVHJO w ;BCCJYQH@NPO[ w QH@TUBUTJOGPQH@TUBUT@SFQPSUFS

Slide 107

Slide 107 text

PostgreSQLͷϞχλϦϯά ՄࢹԽͷͨΊͷπʔϧ w .BDLFSFMQMVHJO w ;BCCJYQH@NPO[ w QH@TUBUTJOGPQH@TUBUT@SFQPSUFS ؆୯Ͱ4BB4ͳͷͰ4FSWFSΛ༻ҙ͠ͳ͍͍ͯ͘ͷͰָ ଟ͘ͷϛυϧ΢ΣΞʹରԠ͍ͯ͠ΔͷͰҰׅ؅ཧͰ͖Δ ͔͠͠1PTUHSF42-ͷৄࡉΛݟΔʹ͸߲໨͕গͳ͍

Slide 108

Slide 108 text

PostgreSQLͷϞχλϦϯά ՄࢹԽͷͨΊͷπʔϧ w .BDLFSFMQMVHJO w ;BCCJYQH@NPO[ w QH@TUBUTJOGPQH@TUBUT@SFQPSUFS .BDLFSFMಉ༷ʹෳ਺ͷϛυϧ΢ΣΞʹରԠ 1PTUHSF42-ͷࡉ͔͍৘ใ·ͰݟΕΔ 4FSWFS͕ඞཁͰ୆਺͕૿͑Δͱ;BCCJYͷνϡʔχϯά΋ඞཁ

Slide 109

Slide 109 text

PostgreSQLͷϞχλϦϯά ՄࢹԽͷͨΊͷπʔϧ w .BDLFSFMQMVHJO w ;BCCJYQH@NPO[ w QH@TUBUTJOGPQH@TUBUT@SFQPSUFS 1PTUHSF42-ઐ༻πʔϧ ৄࡉͳ৘ใ·ͰՄࢹԽͰ͖Δ Έ͔͔੡ͳͷͰ೔ຊޠυΩϡϝϯτ΋͋Δ ͔͠͠1PTUHSF42-ઐ༻ͳ্ʹ؀ڥߏங͕൥ࡶ

Slide 110

Slide 110 text

PostgreSQLͷϞχλϦϯά ࣗ෼ʹ߹ͬͨπʔϧΛબͿ

Slide 111

Slide 111 text

PostgreSQLͷϞχλϦϯά ࣗ෼ʹ߹ͬͨπʔϧΛબͿ ˣ ΠνϩʔͷόοτΛ࢖͔ͬͨΒͱݴͬͯ ΠνϩʔʹͳΕΔΘ͚Ͱ͸ͳ͍

Slide 112

Slide 112 text

͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹPostgreSQLͷ಺෦ߏ଄ ̏ɹPostgreSQLͷ౷ܭ৘ใ ̐ɹPostgreSQLͷϞχλϦϯά ̑ɹ·ͱΊ

Slide 113

Slide 113 text

·ͱΊ ઌਓͷ஌ܙΛ࢖͏

Slide 114

Slide 114 text

·ͱΊ ઌਓͷ஌ܙΛ࢖͏ ˣ ެࣜυΩϡϝϯτΛಡ΋͏

Slide 115

Slide 115 text

·ͱΊ ઌਓͷ஌ܙΛ࢖͏ ˣ ެࣜυΩϡϝϯτΛಡ΋͏ ҆৺ͷ೔ຊޠυΩϡϝϯτ

Slide 116

Slide 116 text

·ͱΊ ·ͣ͸ՄࢹԽΛ͢Δ

Slide 117

Slide 117 text

·ͱΊ ਪଌΑΓܭଌ

Slide 118

Slide 118 text

·ͱΊ ਪଌΑΓܭଌ ↓ ܭଌΑΓ؍ଌ

Slide 119

Slide 119 text

·ͱΊ ࣄ࣮ΛΑΓଟ͘ɺਖ਼͘͠஌Δ͜ͱͰ ະདྷΛਖ਼͘͠༧ଌͰ͖Δ

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

·ͱΊ ΤϯδχΞʹ͸ࠜڌ͕ඞཁ

Slide 122

Slide 122 text

·ͱΊ ΤϯδχΞʹ͸ࠜڌ͕ඞཁ ↓ ͳΜͱͳ͘Ͱ࢓ࣄ͸ग़དྷͳ͍

Slide 123

Slide 123 text

·ͱΊ

Slide 124

Slide 124 text

·ͱΊ

Slide 125

Slide 125 text

·ͱΊ

Slide 126

Slide 126 text

·ͱΊ ςετίʔυ͸ϓϩάϥϜͷ඼࣭ͷՄࢹԽ ϞχλϦϯά͸αʔϏεͷ඼࣭ͷՄࢹԽ

Slide 127

Slide 127 text

·ͱΊ lߴ౓ʹൃୡͨ͠γεςϜͷҟৗ͸ ਆͷౖΓͱݟ෼͚͕͔ͭͳ͍z ŠZ@VVLJ

Slide 128

Slide 128 text

·ͱΊ ମॏܭʹ৐Δ͚ͩͰ͸૫ͤͳ͍

Slide 129

Slide 129 text

·ͱΊ ମॏܭʹ৐Δ͚ͩͰ͸૫ͤͳ͍ ↓ ඼࣭ΛՄࢹԽ͚ͨͩ͠Ͱ͸վળ͸͞Εͳ͍

Slide 130

Slide 130 text

·ͱΊ lखΛಈ͔ͨ͠ਓ͚͕ͩੈքΛม͑Δz Š:BTVIJSP0OJTIJ

Slide 131

Slide 131 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ