このRDBについて私は驚くべき闇を見つけたがそこを発表するにはネットは怖すぎる

 このRDBについて私は驚くべき闇を見つけたがそこを発表するにはネットは怖すぎる

YAP(achimon)C::Asia Hachioji 2016midの資料です。

88f4e84b94fe07cddbd9e6479d689192?s=128

soudai sone

July 03, 2016
Tweet

Transcript

  1. ͜ͷRDBʹ͍ͭͯ ࢲ͸ڻ͘΂͖ҋΛݟ͚͕ͭͨ ͦ͜Λൃද͢Δʹ͸ωοτ͸ා͗͢Δ :"1$"TJB)BDIJPKJ

  2. What is it? σʔλϕʔεͷण໋͸ ΞϓϦέʔγϣϯΑΓ΋௕͍

  3. What is it? ͭ·Γɾɾɾ

  4. What is it? ҋ΋ଟ͍

  5. What is it? ͦΜͳࢲͷ ۪ஒ ܦݧஊΛ͓࿩͠·͢

  6. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  7. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  8. ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ31ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿגࣜձࣾɹΦϛΧϨʢCTOʣ ॴଐɿ೔ຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦௕ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

  9. ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ31ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿגࣜձࣾɹΦϛΧϨʢCTOʣ ॴଐɿ೔ຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦௕ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

  10. What is it? d

  11. ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ31ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿגࣜձࣾɹΦϛΧϨʢCTOʣ ॴଐɿ೔ຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦௕ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

  12. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  13. MySQL ͦʔ͍ͩ͸ౖܹͨ͠ɻ

  14. MySQL ͦʔ͍ͩ͸.Z42-͸Θ͔Β͵ɺ ͚ΕͲ΋ܕʹ͸ਓҰ൪හײͰ͋ͬͨ

  15. ܕม׵ -- ςʔϒϧͷߏ଄ `hoge` CREATE TABLE IF NOT EXISTS `hoge`

    ( `id` int(11) NOT NULL, `val` varchar(255) NOT NULL ); mysql> SELECT * FROM hoge; +----+--------+ | id | val | +----+--------+ | 1 | ONE | | 2 | 2 | | 3 | Three3 | | 4 | 4Four | +----+--------+ 4 rows in set (0,00 sec)
  16. ܕม׵ mysql> SELECT * FROM hoge WHERE val = "0";

    Empty set (0,00 sec) mysql> SELECT * FROM hoge WHERE val = 2; +----+-----+ | id | val | +----+-----+ | 2 | 2 | +----+-----+ 1 row in set, 3 warnings (0,00 sec)
  17. ܕม׵ mysql> SELECT * FROM hoge WHERE val = 4;

    +----+-------+ | id | val | +----+-------+ | 4 | 4Four | +----+-------+ 1 row in set, 3 warnings (0,00 sec) mysql> SELECT * FROM hoge WHERE val = 3; Empty set, 3 warnings (0,00 sec)
  18. ܕม׵ -- ςʔϒϧͷߏ଄ `hoge` CREATE TABLE IF NOT EXISTS `hoge`

    ( `id` int(11) NOT NULL, `val` varchar(255) NOT NULL ); mysql> SELECT * FROM hoge; +----+--------+ | id | val | +----+--------+ | 1 | ONE | | 2 | 2 | | 3 | Three3 | | 4 | 4Four | +----+--------+ 4 rows in set (0,00 sec)
  19. ܕม׵ mysql> SELECT * FROM hoge WHERE val = 4;

    +----+-------+ | id | val | +----+-------+ | 4 | 4Four | +----+-------+ 1 row in set, 3 warnings (0,00 sec) mysql> SELECT * FROM hoge WHERE val = 3; Empty set, 3 warnings (0,00 sec) ઌ಄͕਺ࣈ ຤ඌ͕਺ࣈ
  20. MySQL 8IZ .Z42-1FPQMFʂʂ

  21. MySQL ࠔͬͨΒ!ZPLV͞Μʹฉ͘

  22. MySQL ԶʮόάͰ͢ΑͶʂʯ

  23. MySQL ԶʮόάͰ͢ΑͶʂʯ ˣ !ZPLV͞Μʮ࢓༷Ͱ͢ʈʈʯ

  24. MySQL WBMͷ৔߹ɺΛจࣈྻʹΩϟετ͢ΔͷͰ͸ͳ͘ɺ WBMΛ%06#-&ʹΩϟετͯ͠ͱൺֱ͍ͯ͠·͢ɻ ӳࣈͰ࢝·Δ453*/(͸%06#-&ʹΩϟετͰ͖ͣʹΩϟετޙͷ஋͕ʹͳ Γ·͕͢ɺBCDͷΑ͏ͳจࣈྻ͸ʮͰ͖Δͱ͜Ζ·ͰΩϟετ͢ΔʯͷͰ Ωϟετޙͷ஋͸ʹͳΓ·͢ɻ ͭ·ΓͰ͢ ͬͯ͜ͱͰɺʮ਺ࣈͰ࢝·Βͳ͍WBMʯͷ΋ͷ͚͕ͩݕࡧʹҾ͔͔ͬΔΘ͚Ͱ͢ɻ ͦͯ͠ٯʹ਺ࣈ͔Β࢝·Βͳ͍จࣈྻ͸8)&3&WBMʹ֘౰͢ΔΘ͚Ͱ͢ɻ

  25. MySQL ೔෇ܕ

  26. MySQL %"5&5*.&ܕ͕4+*4ͩͱ */%&9͕ޮ͔ͳ͍Ṗ

  27. MySQL %"5&5*.&ܕ͕4+*4ͩͱ */%&9͕ޮ͔ͳ͍Ṗ ˣ ·͊65'࢖͑

  28. MySQL .Z42-ҎԼͩͱ%"5&5*.&ܕ ͷσϑΥϧτ஋ʹ $633&/5@%"5&5*.&࢖͑ͳ͍

  29. MySQL

  30. MySQL

  31. MySQL ͦΜͳ࢓༷ཁΒͳ͍ͩΖ͆

  32. MySQL

  33. MySQL ͦΜͳ࢓༷ඞཁͩͬͨʜ

  34. MySQL ਏ͍ʢ͔Β͍

  35. MySQL 1PTUHSF42-ͱҧ͏ͱ͜Ζ

  36. MySQL bTPOF`b40/&`໰୊

  37. MySQL bTPOF`b40/&`໰୊ σϑΥϧτͰ͸۠ผ͠ͳ͍ όΠφϦܕΛࢦఆͨ͠Βग़དྷΔ

  38. MySQL $)&$,੍໿ͱ*/%&9ͷ߱ॱ

  39. MySQL $)&$,੍໿ͱ*/%&9ͷ߱ॱ ˣ ͦΜͳ΋ͷ͸ແ͍

  40. MySQL $)&$,੍໿ͱ*/%&9ͷ߱ॱ ˣ ͦΜͳ΋ͷ͸ແ͍ Ͱ΋ΫΤϦ͸௨Δ

  41. MySQL ·͊ͦΜͳࡉ͔͍͜ͱ͸ྑ͍

  42. MySQL ֆจࣈ

  43. MySQL ໰୊

  44. MySQL

  45. MySQL ͦ΋ͦ΋ֆจࣈ੾ΓऔΒΕ໰୊

  46. MySQL VOJDPEF @DJͳ৔߹ ʢྫ͑͹VUG@HFOFSBM@DJͷ৔߹ʣ

  47. MySQL ֆจࣈΛؚΊͨҎ߱ͷจࣈ͕ શ෦ࣺͯΒΕͯอଘ͞Ε·͢

  48. MySQL ରࡦͱͯ͠͸ VUGNC@CJOΛ࢖͏

  49. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  50. PostgreSQL QHBENJO

  51. PostgreSQL

  52. PostgreSQL

  53. PostgreSQL

  54. PostgreSQL

  55. PostgreSQL Ͱ΋ෆຬͷ੠Λฉ͔ͳ͍

  56. PostgreSQL ΞϯέʔτͱͬͯΈͨ

  57. PostgreSQL

  58. PostgreSQL

  59. PostgreSQL গ਺೿ͩͬͨ

  60. PostgreSQL ࣾ಺ͷ੠ ˣ QIQ.Z"ENJOͰ͢Α

  61. PostgreSQL ࣾ಺ͷ੠ ˣ ۀ຿தʹ5XJUUFSͷΞϯέʔτʹ ౴͑ΕΔਓ͕গ਺೿Ͱ͢Αɻ

  62. PostgreSQL ਖ਼࿦ͩͬͨ

  63. PostgreSQL ϩέʔϧ໰୊

  64. PostgreSQL ϩέʔϧ໰୊ σϑΥϧτ͸04ͷϩέʔϧΛར༻͢Δɻ ͦͷͨΊιʔτ͕૝ఆͱมΘΔ ˠϩέʔϧʹ$Λࢦఆ͢Δඞཁ͕͋Δ

  65. PostgreSQL 04ʹΑͬͯίϚϯυ͕ҧ͏

  66. PostgreSQL 04ʹΑͬͯίϚϯυ͕ҧ͏ ͪΐͬͱͨ͠ύονΛ౰ͯΔͱ͖ʹࠔΔ ಛʹ"OTJCMF͕ࠔΔ

  67. PostgreSQL ϚςϏϡʔͷޭࡑ

  68. PostgreSQL ͩͱϩοΫ͕ΩπΠ Ͱͪΐͬͱྑ͘ͳ͚ͬͨͲ

  69. PostgreSQL ϚςϏϡʔͷࠩ෼ߋ৽ͳͲͳ͍

  70. PostgreSQL ࣗಈߋ৽΋ͳ͍

  71. PostgreSQL !ZPLV ʮͦΕී௨ʹςʔϒϧ࡞Ε͹͍͍͡ΌΜʯ

  72. PostgreSQL ͙͎ਖ਼࿦

  73. PostgreSQL ؂ࠪϩά͸ແ͍

  74. PostgreSQL Ϛϧνϓϩηεͷͤ͘ʹόοΫΤϯ υϓϩηε͕མͪͨΒશ෦མͪΔ

  75. PostgreSQL 44%ͳͷʹ஗͍

  76. PostgreSQL 'SFF[Fॲཧ 7"$66.ͷࡍʹ 9*%ͷ࠶ઃఆͷͨΊʹ'6--4$"/͕૸Δ

  77. PostgreSQL ͦ΋ͦ΋9*%͕CJUͳͷ͕ฅ

  78. PostgreSQL ϙετ0SBDMF%#ʢসʣ

  79. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  80. Ξϯνύλʔϯ %&-&5&@'"-(

  81. Ξϯνύλʔϯ ϑϥά໊ͬͯલ4&-&$5ͨ͠Β ͱ͔/6--͕͍Δ

  82. Ξϯνύλʔϯ ϑϥά໊ͬͯલ4&-&$5ͨ͠Β ͱ͔/6--͕͍Δ ΧϥϜ໊ͱσʔλ͕ണ཭͍ͯ͠Δ TUBUVTͷJOU͕ϚδοΫφϯόʔԽ

  83. Ξϯνύλʔϯ ඇਖ਼نԽ

  84. Ξϯνύλʔϯ ඇਖ਼نԽ ଎౓ͱਖ਼نԽ͸τϨʔυΦϑͱ ݴ͏৔߹΋͋Δ͕ਖ਼͍͠σʔλΛ࡞Ζ͏

  85. Ξϯνύλʔϯ ඇਖ਼نԽ ଎౓ͱਖ਼نԽ͸τϨʔυΦϑͱ ݴ͏৔߹΋͋Δ͕ਖ਼͍͠σʔλΛ࡞Ζ͏ ϚςϏϡʔͩͬͨΓΩϟογϡͰ ղܾग़དྷΔࣄ΋ଟ͍

  86. Ξϯνύλʔϯ ֎෦ΩʔϨεઃܭ

  87. Ξϯνύλʔϯ ֎෦ΩʔϨεઃܭ ਖ਼نԽ΋֎෦Ωʔ੍໿΋ σʔλΛकΔͨΊʹ͋Δʂʂ

  88. Ξϯνύλʔϯ ͦ΋ͦ΋͓લΒ42-ษڧ͠Ζ

  89. Ξϯνύλʔϯ ͋Δ೔ಥવ஗͘ͳΔ

  90. Ξϯνύλʔϯ ͋Δ೔ಥવ஗͘ͳΔ ˣ σʔλྔ͕ϝϞϦʹ৐Βͳ͘ͳΔ

  91. ࣮ફͰϋϚΔ᠘ w ूܭର৅͕େ͖͘ͳͬͯूܭ࣌ʹϝϞϦʹ৐Βͳ͍
 ˠ5FNQPSBSZΛ%JTLʹు͘ͷͰॏ͘ͳΔ w */%&9͕ແ͘5"#-&εΩϟϯΛ͍ͯͨ͠
 ˠςετ࣌͸σʔλ͕খ͔ͬͨ͞ͷͰ໰୊ʹؾ͔ͮͳ͔ͬͨ w ϓϩάϥϜ͕ϧʔϓͷ਺͚ͩΫΤϦΛ౤͍͛ͯͨ
 ˠߦ਺͕૿͑Δͱϧʔϓճ਺͕૿͑ͯॏ͘ͳΔ

    w ߋ৽͕ܹ͘͠*/%&9ͷஅยԽ͕ൃੜͨ͠
 ˠ61%"5&΍%&-&5&ʹΑͬͯ*/%&9͕அยԽͯ͠஗͘ͳΔ
  92. ࣮ફͰϋϚΔ᠘ w ूܭର৅͕େ͖͘ͳͬͯूܭ࣌ʹϝϞϦʹ৐Βͳ͍
 ˠ5FNQPSBSZΛ%JTLʹు͘ͷͰॏ͘ͳΔ w */%&9͕ແ͘5"#-&εΩϟϯΛ͍ͯͨ͠
 ˠςετ࣌͸σʔλ͕খ͔ͬͨ͞ͷͰ໰୊ʹؾ͔ͮͳ͔ͬͨ w ϓϩάϥϜ͕ϧʔϓͷ਺͚ͩΫΤϦΛ౤͍͛ͯͨ
 ˠߦ਺͕૿͑Δͱϧʔϓճ਺͕૿͑ͯॏ͘ͳΔ

    w ߋ৽͕ܹ͘͠*/%&9ͷஅยԽ͕ൃੜͨ͠
 ˠ61%"5&΍%&-&5&ʹΑͬͯ*/%&9͕அยԽͯ͠஗͘ͳΔ ࣮ߦܭըΛ ݟΕΔΑ͏ʹͳΖ͏
  93. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹMySQL ̏ɹPostgreSQL ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  94. ·ͱΊ %#ͷ໰୊͸๨Εͨࠒʹ΍ͬͯ͘Δ

  95. ·ͱΊ

  96. ·ͱΊ 3%#ͷ஌ࣝ͸ण໋͕௕͍

  97. ·ͱΊ 3%#ͷ஌ࣝ͸ण໋͕௕͍ ˣ ֮͑Ε͹࢓ࣄͰ௕͍ؒ໾ʹཱͭ

  98. ·ͱΊ 3%#ͷ஌ࣝ͸ण໋͕௕͍ ˣ ֮͑Ε͹࢓ࣄͰ௕͍ؒ໾ʹཱͭ ͔ͩΒͦ͜एऀ΍ঁੑʹੋඇڵຯΛ࣋ͬͯཉ͍͠

  99. ·ͱΊ %#ͷ໰୊͸ΫϦςΟΧϧ

  100. ·ͱΊ σʔλͷࢮ͸αʔϏεͷࢮ

  101. ·ͱΊ %#ͷ໰୊͸ΫϦςΟΧϧ ˣ ͭ·Γղܾ͢Ε͹ӳ༤

  102. ·ͱΊ ۪ऀ͸ܦݧʹֶͿ ݡऀ͸աڈʹֶͿ

  103. ·ͱΊ 3%#͸ྺ࢙͕௕͍

  104. ·ͱΊ 3%#͸ྺ࢙͕௕͍ ˣ ৭Μͳܦݧஊ͔Βֶ΂Δ

  105. ·ͱΊ ΋ͬͱΈΜͳࣦഊஊΛڞ༗͠Α͏ʂ

  106. ·ͱΊ 3%#͸͍͍ͧɻ

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