<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; FIX : Error : Msg 1949, Level 16: Cannot create index on view. The function  yields nondeterministic results. Use a deterministic system function, or modify the user-defined function to return deterministic results.</title>
	<atom:link href="http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 23 May 2013 14:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: HariKrishnan</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-87681</link>
		<dc:creator><![CDATA[HariKrishnan]]></dc:creator>
		<pubDate>Mon, 13 Sep 2010 09:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-87681</guid>
		<description><![CDATA[Hi Pinal, 

If I have an indexed view and the data got change in the tables included does it affect the view. I think it affects. what is the exact use of with noexpand]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, </p>
<p>If I have an indexed view and the data got change in the tables included does it affect the view. I think it affects. what is the exact use of with noexpand</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralf Dietrich</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-81137</link>
		<dc:creator><![CDATA[Ralf Dietrich]]></dc:creator>
		<pubDate>Wed, 21 Jul 2010 18:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-81137</guid>
		<description><![CDATA[The Reason is that ALL Data (not even the indexed columns) is stored on disk.
Which value should SQL Server have persisted if you have a non-deterministic function in the view.
Assume you use GetDate() in your view-definition.
Assume SQL Server stores the time from the point of index creation.
Or should he store the time from the point of inserting the new row. But what about the existing rows?
Or should SQL Server store the time of the point when a user queries the view? But what about 2.000 concurrent users??? questions over questions with non-determistic functions :-)]]></description>
		<content:encoded><![CDATA[<p>The Reason is that ALL Data (not even the indexed columns) is stored on disk.<br />
Which value should SQL Server have persisted if you have a non-deterministic function in the view.<br />
Assume you use GetDate() in your view-definition.<br />
Assume SQL Server stores the time from the point of index creation.<br />
Or should he store the time from the point of inserting the new row. But what about the existing rows?<br />
Or should SQL Server store the time of the point when a user queries the view? But what about 2.000 concurrent users??? questions over questions with non-determistic functions :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santosh Gadila</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-75513</link>
		<dc:creator><![CDATA[Santosh Gadila]]></dc:creator>
		<pubDate>Thu, 10 Jun 2010 18:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-75513</guid>
		<description><![CDATA[Hi Pinal,
Why using non-deterministic functions is not allowed in Indexed View?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
Why using non-deterministic functions is not allowed in Indexed View?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-59149</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-59149</guid>
		<description><![CDATA[Hello Vikram,

Ritesh has pointed out all pros of indexing on view. But there are some cons also such as extra storage space requirement and slow performance of insert-update-delete on base tables.
When an index is created on a view then data of all columns (not only of indexed columns) of view is stored saperately on disk. That could be an issue if view returnd millions of rows.
All updates and changes in all base tables are also reflected in indexed view simultaneously. So DML transactions take longer time to complete. 

So decide about indexed view only after considering all pros and cons.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Vikram,</p>
<p>Ritesh has pointed out all pros of indexing on view. But there are some cons also such as extra storage space requirement and slow performance of insert-update-delete on base tables.<br />
When an index is created on a view then data of all columns (not only of indexed columns) of view is stored saperately on disk. That could be an issue if view returnd millions of rows.<br />
All updates and changes in all base tables are also reflected in indexed view simultaneously. So DML transactions take longer time to complete. </p>
<p>So decide about indexed view only after considering all pros and cons.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-59148</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-59148</guid>
		<description><![CDATA[Hi Paresh,

The first index on view is always clustered index. So there is no way to create a non-clustered index on view without creating a clustered index.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hi Paresh,</p>
<p>The first index on view is always clustered index. So there is no way to create a non-clustered index on view without creating a clustered index.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paresh</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-59124</link>
		<dc:creator><![CDATA[Paresh]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 06:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-59124</guid>
		<description><![CDATA[Hi Pinal,

Nice article.

I want to eagar for If my base table has millions+ records.So, is it fine to create cluster index or noncluster inex on that view?
Becuse if i create a cluster index then it will take more space and hardly for maintenance.

What actully need to do?

Thnaks,
Paresh]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Nice article.</p>
<p>I want to eagar for If my base table has millions+ records.So, is it fine to create cluster index or noncluster inex on that view?<br />
Becuse if i create a cluster index then it will take more space and hardly for maintenance.</p>
<p>What actully need to do?</p>
<p>Thnaks,<br />
Paresh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ritesh Shah</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-59121</link>
		<dc:creator><![CDATA[Ritesh Shah]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 06:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-59121</guid>
		<description><![CDATA[@Vikram,

 Indexed views can increase query performance in the following ways:

    *       Aggregations can be precomputed and stored in the index to minimize expensive computations during query execution.

    *       Tables can be prejoined and the resulting data set stored.
    
   *      Combinations of joins or aggregations can be stored.

you can find more details from below URL:

http://technet.microsoft.com/en-us/library/cc917715.aspx

Moreover, I have written bit same article at 

http://www.sqlhub.com/2009/07/cannot-create-index-on-view-msg-1940.html

which might give you an idea which kind of error comes between while dealing with Views.]]></description>
		<content:encoded><![CDATA[<p>@Vikram,</p>
<p> Indexed views can increase query performance in the following ways:</p>
<p>    *       Aggregations can be precomputed and stored in the index to minimize expensive computations during query execution.</p>
<p>    *       Tables can be prejoined and the resulting data set stored.</p>
<p>   *      Combinations of joins or aggregations can be stored.</p>
<p>you can find more details from below URL:</p>
<p><a href="http://technet.microsoft.com/en-us/library/cc917715.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/cc917715.aspx</a></p>
<p>Moreover, I have written bit same article at </p>
<p><a href="http://www.sqlhub.com/2009/07/cannot-create-index-on-view-msg-1940.html" rel="nofollow">http://www.sqlhub.com/2009/07/cannot-create-index-on-view-msg-1940.html</a></p>
<p>which might give you an idea which kind of error comes between while dealing with Views.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikram</title>
		<link>http://blog.sqlauthority.com/2009/12/30/sql-server-fix-error-msg-1949-level-16-cannot-create-index-on-view-the-function-yields-nondeterministic-results-use-a-deterministic-system-function-or-modify-the-user-defined-function-to-r/#comment-59117</link>
		<dc:creator><![CDATA[vikram]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 03:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7524#comment-59117</guid>
		<description><![CDATA[Good one, never came across this one but would not have known had I not read this.  
Pinal, Question though -
What is the performance gain and  the impact of creating a index on a view? how does it work? For example. 
If my view is really gathering a huge (10 millions+) chunk of data, would creating a index on the fields that are most commonly queried/selected against benefit the performance? what is the impact on the size growth? Thanks.]]></description>
		<content:encoded><![CDATA[<p>Good one, never came across this one but would not have known had I not read this.<br />
Pinal, Question though -<br />
What is the performance gain and  the impact of creating a index on a view? how does it work? For example.<br />
If my view is really gathering a huge (10 millions+) chunk of data, would creating a index on the fields that are most commonly queried/selected against benefit the performance? what is the impact on the size growth? Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
