<?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>Developer.Baare.com &#187; SQL Server</title>
	<atom:link href="http://www.baare.com/index.php/category/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.baare.com</link>
	<description>To succeed in life, you need two things: ignorance and confidence</description>
	<lastBuildDate>Mon, 06 Feb 2012 16:04:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Even de werk iPad aan het testen.</title>
		<link>http://www.baare.com/index.php/2010/05/31/even-de-werk-ipad-aan-het-testen/</link>
		<comments>http://www.baare.com/index.php/2010/05/31/even-de-werk-ipad-aan-het-testen/#comments</comments>
		<pubDate>Mon, 31 May 2010 18:47:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Algemeen]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[technologie]]></category>

		<guid isPermaLink="false">http://www.baare.com/?p=483</guid>
		<description><![CDATA[Leuk ding. Aangenamer dan een laptop op de knieen. Toetsenbord is groot genoeg. De interface is soms wel wat zoeken. Tot zover de eerste 10 minuten. benieuwd hoeveel hij hier gaat kosten&#8230;]]></description>
			<content:encoded><![CDATA[<p>Leuk ding. Aangenamer dan een laptop op de knieen. Toetsenbord is groot genoeg. De interface is soms wel wat zoeken. Tot zover de eerste 10 minuten.</p>
<p>benieuwd hoeveel hij hier gaat kosten&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baare.com/index.php/2010/05/31/even-de-werk-ipad-aan-het-testen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>T-SQL temp table vs table variables vs Common Table Expressions (CTE)</title>
		<link>http://www.baare.com/index.php/2010/05/17/t-sql-temp-table-vs-table-variables-vs-common-table-expressions-cte-with-clause/</link>
		<comments>http://www.baare.com/index.php/2010/05/17/t-sql-temp-table-vs-table-variables-vs-common-table-expressions-cte-with-clause/#comments</comments>
		<pubDate>Mon, 17 May 2010 18:49:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[performance tuning]]></category>

		<guid isPermaLink="false">http://www.baare.com/?p=473</guid>
		<description><![CDATA[Temp tables Behave just like normal tables, but are created in the TempDB database. They persist until dropped, or until the connection that created them disappears. They are visible in the procedure that created them and any procedures that that proc calls. Just like normal tables, they can have primary keys, constraints and indexes, and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Temp tables</strong></p>
<p>Behave just like normal tables, but are created in the TempDB database. They persist until dropped, or until the connection that created them disappears. They are visible in the procedure that created them and any procedures that that proc calls.</p>
<p>Just like normal tables, they can have primary keys, constraints and indexes, and column statistics are kept for the table.</p>
<p>Temp tables, while they have space assigned to them in the tempDB database, will generally be accessed only from memory, unless the server is under memory pressure, or the amount of data in the table is large.</p>
<p><strong>Table Variables</strong></p>
<p>These tables behave very much like other variables in their scoping rules. They are created when they are declared and are dropped when they go out of scope. They cannot be explicitly dropped.</p>
<p>Like with temp tables, table variables reside in TempDB. they have entries in the system tables in tempDB, just like temp tables, and they follow the same behaviour regarding whether they are in memory or on disk.</p>
<p>Table variables can have a primary key, but indexes cannot be created on them, neither are statistics maintained on the columns. This makes table variables less optimal for large numbers of rows, as the optimiser has no way of knowing the number of rows in the table variable.</p>
<p><strong>CTE</strong></p>
<p>In my experience, CTEs are more like temporary views than anything else. When you look at the execution plan, you&#8217;ll see that they are inlined into the query, not materialised and stored. I find, with the exception of recursion, they&#8217;re more to make queries simpler to write than faster to run.</p>
<p>(Bron <a href="http://www.sqlservercentral.com/Forums/Topic415829-338-1.aspx">http://www.sqlservercentral.com/Forums/Topic415829-338-1.aspx</a>)</p>
<p>meer nuttige artikels</p>
<p><a href="http://www.sql-server-performance.com/articles/per/temp_tables_vs_variables_p1.aspx">http://www.sql-server-performance.com/articles/per/temp_tables_vs_variables_p1.aspx</a></p>
<p><a href="http://sqllearnings.blogspot.com/2009/04/issues-with-abusing-table-variables.html">http://sqllearnings.blogspot.com/2009/04/issues-with-abusing-table-variables.html</a></p>
<p><a href="http://blogs.msdn.com/craigfr/archive/2007/10/18/ctes-common-table-expressions.aspx">http://blogs.msdn.com/craigfr/archive/2007/10/18/ctes-common-table-expressions.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.baare.com/index.php/2010/05/17/t-sql-temp-table-vs-table-variables-vs-common-table-expressions-cte-with-clause/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sql Server index fragmentation</title>
		<link>http://www.baare.com/index.php/2009/03/26/sql-server-index-fragmentation/</link>
		<comments>http://www.baare.com/index.php/2009/03/26/sql-server-index-fragmentation/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 23:26:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MCDBA]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[performance tuning]]></category>

		<guid isPermaLink="false">http://www.baare.com/index.php/2009/03/26/sql-server-index-fragmentation/</guid>
		<description><![CDATA[Een van de vele redenen waarom een SQL Server database traag kan worden is fragmentatie van de indexen.  Met onderstaand script kan je eenvoudig de fragmentatie van de indexen op je SQL Server database bekijken. (Op voorwaarde dat je de nodige security rechten hebt.). SELECT db_name(ps.database_id), object_name(ps.OBJECT_ID),  b.name, ps.avg_fragmentation_in_percent, ps.page_count  FROM sys.dm_db_index_physical_stats (db_id(&#8216;myDatabase&#8217;), NULL, NULL, NULL, &#8216;LIMITED&#8217;) [...]]]></description>
			<content:encoded><![CDATA[<p>Een van de vele redenen waarom een SQL Server database traag kan worden is fragmentatie van de indexen.  Met onderstaand script kan je eenvoudig de fragmentatie van de indexen op je SQL Server database bekijken. (Op voorwaarde dat je de nodige security rechten hebt.).</p>
<p>SELECT db_name(ps.database_id), object_name(ps.OBJECT_ID),<br />
 b.name, ps.avg_fragmentation_in_percent, ps.page_count<br />
 FROM sys.dm_db_index_physical_stats (db_id(&#8216;myDatabase&#8217;), NULL, NULL, NULL, &#8216;LIMITED&#8217;) AS ps<br />
 INNER JOIN sys.indexes AS b ON ps.OBJECT_ID = b.OBJECT_ID<br />
 AND ps.index_id = b.index_id<br />
 WHERE ps.database_id = DB_ID() and avg_fragmentation_in_percent &gt; 50 and b.name &lt;&gt; &#8216;NULL&#8217;<br />
 ORDER by ps.avg_fragmentation_in_percent desc</p>
<p>Het script geeft een lijst terug van alle indexen die meer dan 50% gefragmenteerd zijn. Wanneer er veel inserts in je database tabellen gebeuren is het goog practice om de fillfactor die databases aan te passen en om regematig de indexen bij te werken met ALTER INDEX .. REORGANIZE�</p>
]]></content:encoded>
			<wfw:commentRss>http://www.baare.com/index.php/2009/03/26/sql-server-index-fragmentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

