<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>smoothy</author_name>
  <author_url>https://blog.hatena.ne.jp/smoothy/</author_url>
  <blog_title>smoothy</blog_title>
  <blog_url>https://smoothy.hatenadiary.org/</blog_url>
  <categories>
    <anon>MySQL</anon>
    <anon>パフォーマンスチューニング</anon>
  </categories>
  <description>お仕事で大量のデータをinsertするスクリプトをRubyで書いていたのですが、 最初、イテレータで1件ごとにinsert文を書いていました・・・ （はずかしいですが・・・）パフォーマンス的に悪かったので調べてみたところ、解決方法がありました〜 1つのinsert文にする こんな書き方でinsert文を作成したところ、かなりパフォーマンスがあがりました insert into table values (1,'hoge'),(2,'foo'),(3,'bar')・・・ 大量のクエリだとエラーになる どのデータベースでも共通かと思いますが、大量のクエリを発行するとエラーになります。 MySQLの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsmoothy.hatenadiary.org%2Fentry%2F20080217%2F1203265452&quot; title=&quot;大量のデータをinsertする - smoothy&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-02-17 01:24:12</published>
  <title>大量のデータをinsertする</title>
  <type>rich</type>
  <url>https://smoothy.hatenadiary.org/entry/20080217/1203265452</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
