<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Programmer with Microsoft tools &#187; money</title>
	<atom:link href="http://msprogrammer.serviciipeweb.ro/category/money/feed/" rel="self" type="application/rss+xml" />
	<link>http://msprogrammer.serviciipeweb.ro</link>
	<description>A programmer journey through code, books and tools</description>
	<lastBuildDate>Mon, 14 May 2012 06:59:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>EF Profiler and investigating object context</title>
		<link>http://msprogrammer.serviciipeweb.ro/2010/11/15/ef-profiler-and-investigating-object-context/</link>
		<comments>http://msprogrammer.serviciipeweb.ro/2010/11/15/ef-profiler-and-investigating-object-context/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 04:17:49 +0000</pubDate>
		<dc:creator>Andrei Ignat</dc:creator>
				<category><![CDATA[money]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[EF]]></category>
		<category><![CDATA[efprof]]></category>

		<guid isPermaLink="false">http://msprogrammer.serviciipeweb.ro/?p=547</guid>
		<description><![CDATA[Summary : EF Profiler worth his money !
Long Description :
I have finished a application with Entity Framework and POCO – and custom generated (.tt) files.
Now it was time to investigate performance  &#8211; and it was a terrific problem.
How EF Prof helped me :
1.  Displaying number of ObjectContext created and disposed in a Unit of Work [...]]]></description>
			<content:encoded><![CDATA[<p>Summary : EF Profiler worth his money !</p>
<p>Long Description :</p>
<p>I have finished a application with Entity Framework and POCO – and custom generated (.tt) files.</p>
<p>Now it was time to investigate performance  &#8211; and it was a terrific problem.</p>
<p>How EF Prof helped me :</p>
<p><strong>1.  D</strong>isplaying number of ObjectContext created and disposed in a Unit of Work and / or web page.</p>
<p><a href="http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/11/image.png"><img style="display: inline; border-width: 0px;" title="image" src="http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/11/image_thumb.png" border="0" alt="image" width="244" height="199" /></a></p>
<p><strong>2. D</strong>isplaying problem with the ObjectCOntext : using same context from multiple threads, alerts about code like  here :</p>
<p><a href="http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/11/image1.png"><img style="display: inline; border-width: 0px;" title="image" src="http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/11/image_thumb1.png" border="0" alt="image" width="206" height="244" /></a></p>
<p>The red dot is about querying the database from the view. The gray one is about selecting a whole table without selecting top 1000 rows(OK, it was a dictionary table, like the list of countries)</p>
<p><strong>3. W</strong>hen you want caching on your site , you can fast see this by seeing the difference between the number of queries and/or number of ObjectContext for the first time and the second one ( first time : 10, second time:2 or 0 <img src='http://msprogrammer.serviciipeweb.ro/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</p>
<p><strong>4. S</strong>ee most expensive queries as time – usually this is a good option to put an index on the “where” columns.More , you can see also non-unique queries (that you perform more than 1 time)</p>
<p><strong>5. I</strong>nvestigate easily all queries. Know what you want to optimize and where.</p>
<p>Improvements  :</p>
<p>1. Say where is the ObjectContext that is not closing.</p>
<p>Alternatives:</p>
<p>How to: View the Store Commands : <a title="http://msdn.microsoft.com/en-us/library/bb896348.aspx" href="http://msdn.microsoft.com/en-us/library/bb896348.aspx">http://msdn.microsoft.com/en-us/library/bb896348.aspx</a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa173918%28SQL.80%29.aspx" target="_blank">Sql Profiler</a> : http://msdn.microsoft.com/en-us/library/aa173918%28SQL.80%29.aspx</p>
<p>(free ones :</p>
<p>http://sites.google.com/site/sqlprofiler/</p>
<p>http://code.google.com/p/sqlexpressprofiler/</p>
<p>)</p>
<p>But the job will be done by yourself!</p>
]]></content:encoded>
			<wfw:commentRss>http://msprogrammer.serviciipeweb.ro/2010/11/15/ef-profiler-and-investigating-object-context/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

