Viewing 15 posts - 6,766 through 6,780 (of 8,760 total)
...and another solution using the pre-split-string table
😎
USE tempdb;
GO
DECLARE @t TABLE (Id INT)
INSERT INTO @t
SELECT 101 UNION ALL
SELECT 102 UNION ALL
SELECT 103 UNION ALL
SELECT 108;
DECLARE @t2 TABLE (CategoryId INT, Id INT)
INSERT...
October 17, 2014 at 12:22 am
Quick solution for SQL Server 2012 and later, replaces also the split into @t
😎
USE tempdb;
GO
DECLARE @t2 TABLE (CategoryId INT, Id INT)
INSERT INTO @t2
SELECT 2, 50 UNION ALL
SELECT 2, 51 UNION...
October 16, 2014 at 10:11 pm
Quick thought, remove the FOR XML from the nested query.
😎
October 16, 2014 at 9:58 pm
First suggestion is to add one step where the files are directly loaded into a staging table as an XML blob, without any shredding or processing. This will give you...
October 16, 2014 at 12:18 pm
You are absolutely right Gianluca, the source of the problem has to be determined before applying any fixes. What I left out in the previous post was of course using...
October 16, 2014 at 8:56 am
davidwarner (10/16/2014)
BTW i read i shouldn't make any changed to maxdop or cost of parra during business hours as SQL will dump the plan cache?
That is correct, so be careful!
It...
October 16, 2014 at 1:04 am
Quick thought, the cost threshold for parallelism is way too low, would suggest setting it to 50 for a start. Can you provide more information on the setup?
😎
October 15, 2014 at 11:34 pm
Further on Luis's post, do only one dateadd operation and use convert for the formatting.:cool:
October 15, 2014 at 10:50 pm
Done this on exactly the same version/edition and the performance is brilliant so no worries there. One thing to check though is the configuration of tempdb, rule of thumb, recommend...
October 15, 2014 at 10:21 pm
Further on mickyT's post, the cross row referencing window functions are perfect for this kind of queries, here is a quick sample.
😎
USE tempdb;
GO
;WITH SAMPLE_DATA(SD_ID,SD_DATE) AS
( SELECT * FROM (VALUES
...
October 15, 2014 at 9:52 pm
dhans123 (10/15/2014)
I also got errorMsg 156, Level 15, State 1, Procedure my_sp, Line 2
Incorrect syntax near the keyword 'FROM'.
Thanks for the question:-)
Got the same on 2014, non of the options...
October 15, 2014 at 12:21 pm
Had few time-outs today, took me half an hour to respond to one post using the 3/4G on the mobile. Thought it was a carrier issue but then on a...
October 15, 2014 at 12:12 pm
Grant Fritchey (10/15/2014)
BOR15K (10/15/2014)
I have created Countries_View and placed the problematic CASE within the view and then JOINT Cities A table with Countries_View B
and all...
October 15, 2014 at 11:49 am
peacesells (10/15/2014)
October 15, 2014 at 10:06 am
BOR15K (10/15/2014)
Eirikur Eiriksson (10/15/2014)
BOR15K (10/15/2014)
I have created Countries_View and placed the problematic CASE within the view and then JOINT Cities A table with Countries_View B
and...
October 15, 2014 at 10:04 am
Viewing 15 posts - 6,766 through 6,780 (of 8,760 total)