<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gomis</author_name>
  <author_url>https://blog.hatena.ne.jp/gomis/</author_url>
  <blog_title>gomisの日記</blog_title>
  <blog_url>https://gomis.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>今日構築してテスト稼動したサーバで、uptimeが３とかになるため調査したら、MySQLが重い。 slow-queryをチェックすると select LAST_INSERT_ID() from table;というqueryに時間がかかってる模様。 ぐぐると、上のqueryは単に以下でいいらしい。 select LAST_INSERT_ID();要は、LAST_INSERT_ID()は文字通り最後にinsertしたIDを返すので、テーブル指定はいらないということ。むしろ、テーブルを指定するとレコードを全部舐めるので重くなる、ということのようだ。 コネクションごとにLAST_INSERT_ID()…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgomis.hatenadiary.org%2Fentry%2F20080708%2F1215507527&quot; title=&quot;メモ：MySQLのLAST_INSERT_IDが遅くなる - gomisの日記&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-07-08 17:58:47</published>
  <title>メモ：MySQLのLAST_INSERT_IDが遅くなる</title>
  <type>rich</type>
  <url>https://gomis.hatenadiary.org/entry/20080708/1215507527</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
