<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omkar Panherkar on Medium]]></title>
        <description><![CDATA[Stories by Omkar Panherkar on Medium]]></description>
        <link>https://medium.com/@omkarpanherkar?source=rss-70fe967a8352------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3nIoecBSNwkBePYQ.</url>
            <title>Stories by Omkar Panherkar on Medium</title>
            <link>https://medium.com/@omkarpanherkar?source=rss-70fe967a8352------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 13:27:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omkarpanherkar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[You can also be fitness freak like me]]></title>
            <link>https://medium.com/@omkarpanherkar/you-can-also-be-fitness-freak-like-me-8058ceb9ed6a?source=rss-70fe967a8352------2</link>
            <guid isPermaLink="false">https://medium.com/p/8058ceb9ed6a</guid>
            <category><![CDATA[weight-loss]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[bodybuilding]]></category>
            <category><![CDATA[gym]]></category>
            <category><![CDATA[fitness]]></category>
            <dc:creator><![CDATA[Omkar Panherkar]]></dc:creator>
            <pubDate>Wed, 31 Jan 2018 06:06:02 GMT</pubDate>
            <atom:updated>2018-01-31T06:06:02.146Z</atom:updated>
            <content:encoded><![CDATA[<p>Current situation is that we live in world of fake it until you make it. Everybody want to build best body, they think and they dream about having big muscles and six packs abs, but just like it is said rome was not built in a day</p><p>Click below link for detail…</p><p><a href="http://www.omkarpanherkar.com/Categories/fitness/health-tips/muscle-gains-tips/you-can-also-be-fitness-freak-like-me">http://www.omkarpanherkar.com/Categories/fitness/health-tips/muscle-gains-tips/you-can-also-be-fitness-freak-like-me</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8058ceb9ed6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retrieve results faster with eager loading]]></title>
            <link>https://medium.com/@omkarpanherkar/retrieve-results-faster-with-eager-loading-73f3ae31e621?source=rss-70fe967a8352------2</link>
            <guid isPermaLink="false">https://medium.com/p/73f3ae31e621</guid>
            <category><![CDATA[eager-loading]]></category>
            <category><![CDATA[laravel-5]]></category>
            <category><![CDATA[php-frameworks]]></category>
            <category><![CDATA[web-developer]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Omkar Panherkar]]></dc:creator>
            <pubDate>Mon, 12 Jun 2017 19:15:49 GMT</pubDate>
            <atom:updated>2017-06-12T19:16:23.328Z</atom:updated>
            <content:encoded><![CDATA[<pre>Eager loading can be explained using following example :</pre><p>We retrieve list of post</p><pre>$posts = App\Posts::all();<br><br>foreach ($posts as $post) {<br>    echo $post-&gt;author-&gt;name;<br>}</pre><p>The above code retreive the lists of post ,now in for loop we print out author name which is in another table ,</p><p>Whenever we call $post-&gt;author-&gt;name there is database call made on authors table .</p><p>So consider there are 100 posts ,</p><ul><li>query 1 retrieves 100 posts . =1 query</li><li>now another query is sent everytime we call $post-&gt;author-&gt;name =100queries</li></ul><p>Therefore total 101 queries are executed on database for above code ,</p><p>To minimize this queries we use eager loading,</p><ul><li>To use eager loading we use with function</li></ul><pre>$posts = App\Posts::with(&#39;author&#39;)-&gt;get();<br><br>foreach ($posts as $post) {<br>    echo $post-&gt;author-&gt;name;<br>}</pre><p>Now only two queries are executed :</p><ol><li>Query 1 to retreieve posts</li><li>Query 2 to retrieve author for each post</li><li>In mysql backend side with is converted as :</li></ol><pre>q1 &gt;select * from posts;<br>q2 &gt;select * from author where id in (select author_id from posts);<br></pre><p>So we minimized the number of queries and improved the performance of application.</p><p>Note : Eager loading gives issue when working with multiple database located on different servers.</p><p>Thank you</p><p>Site Link</p><p><a href="http://www.omkarpanherkar.com/retrieve-results-faster-with-eager-loading">http://www.omkarpanherkar.com/retrieve-results-faster-with-eager-loading</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73f3ae31e621" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>