﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Parameter issue / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 22:30:28 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>I could not understand in much detail about your problem. But I think, it is related to Distributed Partitioned vie.Please go through the below link:http://msdn.microsoft.com/en-us/library/aa175250(v=sql.80).aspxIt might help you.Regards,Mahendra Jain</description><pubDate>Thu, 11 Oct 2012 10:08:44 GMT</pubDate><dc:creator>mahen83</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>Heres a link that might help you:http://furrukhbaig.wordpress.com/2007/08/22/parameter-sniffing/</description><pubDate>Tue, 21 Dec 2010 06:37:38 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>I just wanted to share the below path too related the topic: http://www.simple-talk.com/sql/performance/sql-server-statistics-problems-and-solutions/</description><pubDate>Tue, 21 Dec 2010 06:12:17 GMT</pubDate><dc:creator>sqlzealot-81</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>I should thank you to route me to the right place.So the point is that should not try the parameters to a variable in a procedure until we see a reason for the same like parameter sniffing;which will lead the optimizer not to choose the best plan as the values are unknown to the optimizer.Am i correct? if so, I learnt a good lesson.</description><pubDate>Fri, 17 Dec 2010 19:19:07 GMT</pubDate><dc:creator>sqlzealot-81</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>Gail has a couple of posts starting here: [url]http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/[/url]This should help you understand what you are seeing.</description><pubDate>Fri, 17 Dec 2010 11:51:50 GMT</pubDate><dc:creator>Jeffrey Williams 3188</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>Yes, I too guess so....   I was trying to explain the following:Say, i have a procedure procCreate proc proc(@param bigint)AS     declare @param1 bigint     Set @param1 = @param     Select &amp;lt;colums&amp;gt; From tab A       inner join tab2 B on A.&amp;lt;col&amp;gt; = B.&amp;lt;col1&amp;gt;       inner join tab3 c on b.&amp;lt;col&amp;gt; = c.&amp;lt;col1&amp;gt; where tab2=@param1 When i see the execution plan it uses tab3 for custerd scanbut if am not using the variable @param1, it uses clustered seek as below.Create proc proc(@param bigint)AS     --declare @param1 bigint     --Set @param1 = @param     Select &amp;lt;colums&amp;gt; From tab A       inner join tab2 B on A.&amp;lt;col&amp;gt; = B.&amp;lt;col1&amp;gt;       inner join tab3 c on b.&amp;lt;col&amp;gt; = c.&amp;lt;col1&amp;gt; where tab2=@paramSomewhere i read/watched vedios on parameter sniffing, there a resolution as setting the params to a variable within the procedure and use the variable for the further operation. As I experienced an odd behaviour, I dont know why?will break the same?Please let me wherei would have gone wrong. or is there someone experienced so.Appreciate your feedbacks.</description><pubDate>Fri, 17 Dec 2010 08:23:20 GMT</pubDate><dc:creator>sqlzealot-81</dc:creator></item><item><title>RE: Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>28 views, no replies... I think that shows you probably should explain a bit better your question, with an example if possible.</description><pubDate>Fri, 17 Dec 2010 02:58:43 GMT</pubDate><dc:creator>Ronald H</dc:creator></item><item><title>Parameter issue</title><link>http://www.sqlservercentral.com/Forums/Topic1036392-391-1.aspx</link><description>    When am assigning a parameter of a procedure to a variable and use tha variable throguh out the procedure, am seeing the plan is not an optimal one as it uses the scan for big tables. However, it uses seek directly with passed parameter. Just conflicting the parameter sniffing resolution like "Assign to a variable and use the variable further".     Help me to understand the situation.</description><pubDate>Fri, 17 Dec 2010 02:27:38 GMT</pubDate><dc:creator>sqlzealot-81</dc:creator></item></channel></rss>