Viewing 15 posts - 3,886 through 3,900 (of 7,597 total)
A covering index is an index that has all the columns needed to satisfy, or "cover", a given query.
For example, say I have a table with 20 columns,...
March 15, 2017 at 3:43 pm
1) You didn't strip the time.
2) You need to use < the ending day, rather than <=
For example:
I've changed it to:
(DateAttribute >= DATEADD(DAY,-10,CAST(GETDATE() AS...
March 15, 2017 at 12:22 pm
Since you already have an identity column, go ahead and add that to make the clustering unique. SQL would "uniquify" it, but it's better to do it yourself to avoid...
March 15, 2017 at 9:32 am
March 14, 2017 at 4:35 pm
Change the clustering index to the 2 columns that are used most often / nearly always as predicates. If you prefer, you can add a unique column as a 3rd...
March 14, 2017 at 9:14 am
Some things to consider:
Typically you'll most likely access these rows by datetime range. I'm guessing the actual query might even have such a date restriction, or, if it...
March 13, 2017 at 1:32 pm
March 10, 2017 at 9:11 am
March 10, 2017 at 9:02 am
March 10, 2017 at 9:02 am
Wow, that's a huge amount of code. Does it do something better than the code I posted earlier?:
SELECT DT.*,
DATEDIFF(YEAR, LowDate, HighDate) - CASE...
March 9, 2017 at 3:51 pm
Yes, the "SET NOCOUNT ON" should be w/i the trigger code itself:
CREATE TRIGGER trEMCondition_INSERT
ON dbo.vEMLocationHistory
AFTER INSERT
AS
SET NOCOUNT ON;
UPDATE e
March 9, 2017 at 3:25 pm
Viewing 15 posts - 3,886 through 3,900 (of 7,597 total)