Viewing 15 posts - 16 through 30 (of 41 total)
Looks like this answer on StackOverflow is relevant to you.
Sql Server: Selective XML Index not being efficiently used
Have a look at using a secondary selective xml index.
June 11, 2015 at 12:18 am
Carlo Romagnano (3/17/2014)
Mikael Eriksson SE (3/17/2014)
Using a query like this will...
March 17, 2014 at 7:19 am
I guess the reason for the rollback is that the output clause is not allowed when you do remote queries.
Using a query like this will show the the generated error...
March 17, 2014 at 1:07 am
There is one more thing to notice about the first query.
You assign the value "2000-02-01 12:34:56.789" to @EndDT but the query returns "2000-01-02 12:34:56.789".
Either make sure you are using "SET...
January 16, 2014 at 1:16 am
There is only one correct answer to this question.
You always need an order by on the select statement if you want the rows ordered in the resultset.
Sometime they may be...
December 2, 2013 at 1:10 am
Hugo Kornelis (10/17/2013)
Great to know - never needed this until now, but you never know when it comes in handy. Thanks, Mikael! 😉
The point I was getting at was not...
October 17, 2013 at 11:56 pm
When you ask for a recompile of the stored procedure it is recompiled on the next execution. The compiled value of @Name for the query will then be what is...
October 17, 2013 at 10:52 am
You need to make sure that the query plan is not already generated and in cache before first execution of the procedure.
October 17, 2013 at 9:15 am
Using sp_recompile 'GetIt' will make the entire stored procedure to be recompiled on next execution.
sp_recompile 'T' recompiles only the queries in the stored procedure that references the table T (statement...
October 17, 2013 at 7:54 am
Check this post for a query the fetches the values from the execution plan.
url=http://www.sqlservercentral.com/Forums/FindPost1505494.aspx
October 17, 2013 at 5:34 am
sqlnaive (10/17/2013)
It gave me "Pelle" two times for both executions.
That is as it should be. The question was about what value was used as input to the query optimizer when...
October 17, 2013 at 3:23 am
It is the same in SQL Server 2005, 2008 and 2012.
If you want to check what the compiled value is you can use this.
create table T(Name varchar(25));
go
create procedure GetIt
...
October 17, 2013 at 12:38 am
You should use sp_executesql with parameters.
Have a look at The Curse and Blessings of Dynamic SQL for a bit more info.
September 26, 2013 at 1:54 am
Viewing 15 posts - 16 through 30 (of 41 total)