<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>murajun1978</author_name>
  <author_url>https://blog.hatena.ne.jp/murajun1978/</author_url>
  <blog_title>Murajun's Style</blog_title>
  <blog_url>https://murajun1978.hatenadiary.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Rails</anon>
  </categories>
  <description>Array#include?のレスポンス改善ヘ(^o^)ノで改善されたレスポンスですが、まだ遅いw と言うわけで、ログを眺めていましたー するとこんなクエリーが... 注) テーブル名は勝手につけた Post Exists (0.2ms) SELECT 1 AS one FROM &quot;posts&quot; LIMIT 1 コードを見てみると、こんな事してた def comments(posts) if posts.exists? # データがあるときの処理 end end モデルインスタンスでexists?するとクエリー発行するのですね... 普段はposts.present?とするので知らんかった な…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmurajun1978.hatenadiary.com%2Fentry%2F2014%2F09%2F11%2F225037&quot; title=&quot;Railsのmodelインスタンスでexists?を使うと... - Murajun&amp;#39;s Style&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>2014-09-11 22:50:37</published>
  <title>Railsのmodelインスタンスでexists?を使うと...</title>
  <type>rich</type>
  <url>https://murajun1978.hatenadiary.com/entry/2014/09/11/225037</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
