<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>n314</author_name>
  <author_url>https://blog.hatena.ne.jp/n314/</author_url>
  <blog_title>ログ日記</blog_title>
  <blog_url>https://n314.hatenablog.com/</blog_url>
  <categories>
    <anon>PostgreSQL</anon>
  </categories>
  <description>ちょっと簡単なサンプルが思い付かないけど。 joinが大量にある巨大なビューから少ない件数のデータを取得する場合。ビュー単体でselectしたら全てインデックススキャンになるようにしていて select * from large_large_view where large_large_view.post_id in (123, 456,789) これは高速になるようにしていた。 しかし select large_view.* from ( select post_id from fav where user_id = ? ) as fav join lateral ( select * fr…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fn314.hatenablog.com%2Fentry%2F2019%2F06%2F06%2F203357&quot; title=&quot;PostgreSQLでビューを使う時の最適化 - ログ日記&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>2019-06-06 20:33:57</published>
  <title>PostgreSQLでビューを使う時の最適化</title>
  <type>rich</type>
  <url>https://n314.hatenablog.com/entry/2019/06/06/203357</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
