<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL Server T-SQL Tuning -TVF and Scalar Functions</title>
	<atom:link href="http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/</link>
	<description>SQL Server Performance Tuning</description>
	<lastBuildDate>Fri, 17 May 2013 13:31:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: DBA</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-3254</link>
		<dc:creator>DBA</dc:creator>
		<pubDate>Sun, 17 Mar 2013 04:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-3254</guid>
		<description><![CDATA[Very helpful and valuable]]></description>
		<content:encoded><![CDATA[<p>Very helpful and valuable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anas</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-3235</link>
		<dc:creator>Anas</dc:creator>
		<pubDate>Sun, 10 Mar 2013 07:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-3235</guid>
		<description><![CDATA[Its very helpful !Thank you for writing this!!]]></description>
		<content:encoded><![CDATA[<p>Its very helpful !Thank you for writing this!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eng Shady</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-3176</link>
		<dc:creator>Eng Shady</dc:creator>
		<pubDate>Sun, 03 Mar 2013 06:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-3176</guid>
		<description><![CDATA[Thanks Shehap for the Blog, very helpful !]]></description>
		<content:encoded><![CDATA[<p>Thanks Shehap for the Blog, very helpful !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KetanDBA</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-3122</link>
		<dc:creator>KetanDBA</dc:creator>
		<pubDate>Sun, 17 Feb 2013 21:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-3122</guid>
		<description><![CDATA[Your blogs help me a lot ... really thankful to you ...]]></description>
		<content:encoded><![CDATA[<p>Your blogs help me a lot &#8230; really thankful to you &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aanitha</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-3093</link>
		<dc:creator>Aanitha</dc:creator>
		<pubDate>Wed, 13 Feb 2013 07:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-3093</guid>
		<description><![CDATA[Interesting and very helpful article. Thanks for writing this !!!]]></description>
		<content:encoded><![CDATA[<p>Interesting and very helpful article. Thanks for writing this !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shehap El-Nagar</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-2933</link>
		<dc:creator>Shehap El-Nagar</dc:creator>
		<pubDate>Wed, 16 Jan 2013 16:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-2933</guid>
		<description><![CDATA[That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable and that is exactly what I meant for that regard]]></description>
		<content:encoded><![CDATA[<p>That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable and that is exactly what I meant for that regard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shehap El-Nagar</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-2926</link>
		<dc:creator>Shehap El-Nagar</dc:creator>
		<pubDate>Wed, 16 Jan 2013 16:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-2926</guid>
		<description><![CDATA[Thx for your comments  …You are definitely right if your case is simple and have just single select statement not multiple statements and complex code logics  coz ITFV (Inline TVF)  actually represents a parameterized  view , thereby my blog here was directed to address such generic MTVF (Multiline TVF) performance issues using the mentioned T-SQL practices which really worked perfectly with me for numerous cases  on HUGE TB DBs  …You can try them also and let me know your input
Perhaps I might included simple examples that can be covered easily by ITVF but generally speaking I tried to show out generic T-SQL practices to address any performance issue of TVFs
In addition,  I consider largely DB stress powers so using Temp table might be sometimes much powerful if replacing MTVF or ITVF if they are used within joins with other tables but you need to check that along with your T-SQL queries and I recommend heavily for your to rely any DB stress tool like SQLQueryStress
Once again …Thx for your follow and comments]]></description>
		<content:encoded><![CDATA[<p>Thx for your comments  …You are definitely right if your case is simple and have just single select statement not multiple statements and complex code logics  coz ITFV (Inline TVF)  actually represents a parameterized  view , thereby my blog here was directed to address such generic MTVF (Multiline TVF) performance issues using the mentioned T-SQL practices which really worked perfectly with me for numerous cases  on HUGE TB DBs  …You can try them also and let me know your input</p>
<p>Perhaps I might included simple examples that can be covered easily by ITVF but generally speaking I tried to show out generic T-SQL practices to address any performance issue of TVFs</p>
<p>In addition,  I consider largely DB stress powers so using Temp table might be sometimes much powerful if replacing MTVF or ITVF if they are used within joins with other tables but you need to check that along with your T-SQL queries and I recommend heavily for your to rely any DB stress tool like SQLQueryStress</p>
<p>Once again …Thx for your follow and comments</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GSquared</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-2923</link>
		<dc:creator>GSquared</dc:creator>
		<pubDate>Wed, 16 Jan 2013 13:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-2923</guid>
		<description><![CDATA[Actually, you can create unique indexes on table variables by assigning unique constraints to them.  SQL Server uses an index to enforce uniqueness.
Try this in a test environment:
USE tempdb;
GO
CREATE TABLE #T (ObjectID INT, IndexID INT);
INSERT INTO #T (ObjectID, IndexID)
SELECT OBJECT_ID, index_id
FROM sys.indexes;
GO
DECLARE @T TABLE (
ID INT IDENTITY PRIMARY KEY,
Col1 INT NOT NULL UNIQUE);
SELECT sys.indexes.OBJECT_ID, sys.indexes.index_id
FROM sys.indexes
EXCEPT
SELECT ObjectID, IndexID
FROM #T;
GO
DECLARE @T TABLE (
ID INT IDENTITY PRIMARY KEY,
Col1 INT NOT NULL);
SELECT sys.indexes.OBJECT_ID, sys.indexes.index_id
FROM sys.indexes
EXCEPT
SELECT ObjectID, IndexID
FROM #T;
GO
DROP TABLE #T;
What you&#039;ll see is that the table variable declared with a UNIQUE constraint generates an index, which shows up in sys.indexes.  You&#039;ll see the PK clustered index in there too.]]></description>
		<content:encoded><![CDATA[<p>Actually, you can create unique indexes on table variables by assigning unique constraints to them.  SQL Server uses an index to enforce uniqueness.</p>
<p>Try this in a test environment:</p>
<p>USE tempdb;<br />
GO<br />
CREATE TABLE #T (ObjectID INT, IndexID INT);</p>
<p>INSERT INTO #T (ObjectID, IndexID)<br />
SELECT OBJECT_ID, index_id<br />
FROM sys.indexes;<br />
GO<br />
DECLARE @T TABLE (<br />
ID INT IDENTITY PRIMARY KEY,<br />
Col1 INT NOT NULL UNIQUE);</p>
<p>SELECT sys.indexes.OBJECT_ID, sys.indexes.index_id<br />
FROM sys.indexes<br />
EXCEPT<br />
SELECT ObjectID, IndexID<br />
FROM #T;<br />
GO<br />
DECLARE @T TABLE (<br />
ID INT IDENTITY PRIMARY KEY,<br />
Col1 INT NOT NULL);</p>
<p>SELECT sys.indexes.OBJECT_ID, sys.indexes.index_id<br />
FROM sys.indexes<br />
EXCEPT<br />
SELECT ObjectID, IndexID<br />
FROM #T;<br />
GO<br />
DROP TABLE #T;</p>
<p>What you&#8217;ll see is that the table variable declared with a UNIQUE constraint generates an index, which shows up in sys.indexes.  You&#8217;ll see the PK clustered index in there too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shehap El-Nagar</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-2894</link>
		<dc:creator>Shehap El-Nagar</dc:creator>
		<pubDate>Sun, 13 Jan 2013 16:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-2894</guid>
		<description><![CDATA[Thx for your kind words and notes …That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable more than temp tables and that is exactly what I meant for that regard
Once again thanks for your comments]]></description>
		<content:encoded><![CDATA[<p>Thx for your kind words and notes …That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable more than temp tables and that is exactly what I meant for that regard</p>
<p>Once again thanks for your comments</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shehap El-Nagar</title>
		<link>http://www.sql-server-performance.com/2012/sql-tuning-tvf-scalar-functions/#comment-2893</link>
		<dc:creator>Shehap El-Nagar</dc:creator>
		<pubDate>Sun, 13 Jan 2013 16:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.sql-server-performance.com/?p=3350#comment-2893</guid>
		<description><![CDATA[Thx for your kind words and notes …That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable and that is exactly what I meant for that regard
Once again thanks for your comments]]></description>
		<content:encoded><![CDATA[<p>Thx for your kind words and notes …That is right , you can create clustered index implicitly on table variable by defining a primary key on some column like DECLARE @TABLE TABLE (name INT primary key) and that is the only way to do that and no other way to create clustered or nonclustered indexes explicitly which actually restrict the chances of having indexes on a table variable and that is exactly what I meant for that regard</p>
<p>Once again thanks for your comments</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.267 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-22 13:35:49 -->
