Viewing 15 posts - 4,096 through 4,110 (of 7,597 total)
The most important thing is to:
Cluster the dbo.FreightRate table on ( SourceKey, CompanyKey, PackingType ).
But you could adjust the query slightly also:
SELECT COALESCE(fr1.FreightRate, fr2.FreightRate, fr3.FreightRate, 0)
FROM dbo.Sales s
LEFT JOIN dbo.FreightRate...
October 5, 2016 at 2:40 pm
To be fair, the number of databases would have an impact here. I've got servers with hundreds (and hundreds) of dbs. Even small files add up to a...
October 4, 2016 at 3:17 pm
drew.allen (10/4/2016)
ScottPletcher (10/4/2016)
October 4, 2016 at 3:10 pm
Create a proc in the master db, beginning the name with "sp_", mark that proc as a system object, then use sp_MSforeachdb to run the proc in the db(s) you...
October 4, 2016 at 2:18 pm
DECLARE @start_date datetime;
DECLARE @end_date datetime;
SET @start_date = '20010101';
SET @end_date = '20010101 23:00';
;WITH tally10 AS (
SELECT number FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) tally(number)
),
tally1000 AS (
SELECT ROW_NUMBER()...
October 4, 2016 at 11:24 am
Sorry, just now have time to follow up on this.
CROSS APPLY (CA) really is a type of join, I'm just co-opting it here to assign names to values. You...
October 4, 2016 at 10:20 am
I think messing with DATEFIRST when you don't absolutely have to is just asking for issues later. The CROSS APPLYs are used just to simplify the main SELECT list...
October 3, 2016 at 2:39 pm
thomashohner (9/30/2016)
September 30, 2016 at 2:19 pm
thomashohner (9/30/2016)
WOW, you have to be joking. 14 seconds row count on the money. Attached is the execution plan.Thank you both so very much. Holy molly :-D:-D
Great, glad it...
September 30, 2016 at 1:36 pm
Try this:
...
Ethnicity,
MaritalStatus,
...
September 30, 2016 at 12:00 pm
In this case, I think it's ok to add the current status to the Orders table, using an efficient, well-written trigger to maintain the status.
However, the lookup of the current...
September 30, 2016 at 11:28 am
I can't see any of the indexes, but perhaps you can combine the Lists lookups as below.
Also, you'll probably get best performance by clustering the Lists table by ( Databasekey,...
September 30, 2016 at 11:21 am
ramana3327 (9/30/2016)
Will there any performance impact by reducing the mdf file size?
Probably not, if the space was never used.
The way to try to shrink with no fragmentation is to use...
September 30, 2016 at 11:00 am
Several things to consider here. I'll number them so that everyone can comment on them more easily:
1) Make sure IFI is on (just in case).
2) Pre-allocate additional space in...
September 29, 2016 at 1:02 pm
Sample dynamic SQL:
DECLARE @MySprocParam VARCHAR(50) = 'TestAlias'
EXEC('SELECT ''ASDF'' AS [' + @MySprocParam + ']')
September 29, 2016 at 12:48 pm
Viewing 15 posts - 4,096 through 4,110 (of 7,597 total)