Viewing 15 posts - 2,416 through 2,430 (of 2,645 total)
This problem has a massive search space. SQL server won't be the fastest solution. Instead of using a table variable you should use a temporary table. It can be done...
August 11, 2017 at 9:19 am
Another point of optimization would be rewriting the scalar Function dbo.fn_SumRangeOfNumbers() so instead of summing integers from a Tally table the function should use the formula for the sum of...
June 6, 2017 at 5:04 am
/* Using ANSI standard information_schema */IF...April 24, 2017 at 7:25 am
April 18, 2017 at 3:29 pm
francesco.mantovani - Wednesday, April 12, 2017 3:09 PMThis is exactly what I was looking for!
You saved me a lot of work
There is...
April 12, 2017 at 5:44 pm
Just thought I'd try this, I noticed that the description says "The second CTE, named L1, uses the BaseNum CTE to generate a second result set with one thousand rows....
March 30, 2017 at 4:46 am
You could do it with global temporary table and drop it after you've finished with it.
declare @sSql as nvarchar(1000)
declare @GuidTableName as nvarchar(50)
set @GuidTableName = NEWID()
set @sSql='set nocount on;;with...
April 6, 2016 at 5:06 pm
And does this return anything in any of the date columns?
SELECT T.name, I.name, U.*
FROM sys.tables T
INNER JOIN sys.dm_db_index_usage_stats U
ON U.OBJECT_ID = T.OBJECT_ID
INNER JOIN sys.indexes I ON...
March 7, 2016 at 10:13 am
What index does the execution plan say it uses when you access it?
March 7, 2016 at 10:02 am
dlchase (3/7/2016)
I got nulls in the last accessed column for about half of the tables in a database and I know many of them have been accessed daily.
If the table...
March 7, 2016 at 9:47 am
Nice script, thank you.
Table Value Constructors were introduced in SQL 2008, so this script doesn't work with versions below that. I've rewritten the query inside the function so it will...
March 7, 2016 at 5:24 am
.
February 12, 2016 at 4:58 pm
Ed Wagner (1/31/2016)
Jonathan AC Roberts (1/31/2016)
CAST(LEFT(OMD, 8) as datetime) + 30 < GETDATE();
This is not good practice, I'm not sure it will even work in versions of SQL Server...
January 31, 2016 at 4:20 pm
CAST(LEFT(OMD, 8) as datetime) + 30 < GETDATE();
This is not good practice, I'm not sure it will even work in versions of SQL Server later than 2005.
You should be...
January 31, 2016 at 1:18 pm
If it is parameter sniffing causing the problem then you can just alter the stored procedure to copy the parameters passed in into ones created within the SP.
Example:
GO
CREATE PROCEDURE mySPWithParameterSniffing
(
...
November 26, 2015 at 12:39 pm
Viewing 15 posts - 2,416 through 2,430 (of 2,645 total)