Viewing 15 posts - 1 through 15 (of 65 total)
We just hit a similar (but way smaller) situation. Altering the size of a column in a large table is a giant pain.
If possible, the best bet is to...
August 12, 2016 at 6:17 pm
TomThomson (7/26/2016)
July 26, 2016 at 9:17 am
“Trying to improve software quality by increasing the amount of testing is like trying to lose weight by weighing yourself more often. What you eat before you step onto the...
July 25, 2016 at 9:19 am
Re - table names that are GUIDs...
If this is a pre-configured database intended as part of a system/application "as is", then whoever did that was at least mildly insane.
However, some...
April 7, 2016 at 1:42 pm
Wikipedia has a good item on "B-Tree", which includes a quote from one of the original inventors - Ed McCreight (with Rudolf Bayer).
The "B" in B-tree does not have a...
February 29, 2016 at 11:27 am
DOH!
There IS an upper bound - today!
Therefore, try the following:
create unique NONCLUSTERED index uixEndDate on <table> (IndexEndDate, PatientID);
create unique CLUSTERED index ucixPatientEndDate on <table> (PatientID, IndexEndDate);
Then, run the query using...
December 11, 2015 at 11:59 am
John Mitchell-245523 (12/9/2015)
Kim Crosser (12/8/2015)
SELECT PatientID, ...
from dbo.MDTest tbl1
where tbl1.IndexEndDate > @dParamDate
and not exists (select 1
from...
December 10, 2015 at 12:38 pm
In similar situations, I found the following to work pretty well:
SELECT PatientID, ...
from dbo.MDTest tbl1
where tbl1.IndexEndDate > @dParamDate
and not exists (select 1
from dbo.MDTest tbl2
...
December 8, 2015 at 6:06 pm
dietztm (11/30/2015)
Your trigger (or auditing query) doesn't need to be visible to the user, it can just spam the devs until they fix it. Also talk to your boss about...
November 30, 2015 at 12:36 pm
TomThomson (11/26/2015)
November 27, 2015 at 11:15 am
anthony.green (11/6/2015)
UPDATEdbo.Cache
SETAvailability = Availability - 1,
LastUpdated = GETUTCDATE()
WHEREUnitId = @UnitId
ANDStartDate < DATEADD(DAY, @Duration, @StartDate)
AND@StartDate < DATEADD(DAY, Duration, StartDate)
ANDAvailability > 0;
Any chance of getting them to recode this query to swap...
November 12, 2015 at 12:35 pm
I believe the initial results were an artifact of the "rollback". Unlike a truncate, which effectively removes the table data instantaneously, the rollback has to restore the state and...
November 5, 2015 at 3:11 pm
Easy ways to create indexes using multiple times the actual table space:
1. Create multiple indexes on MANY columns in the table (I have actually seen indexes defined that were...
November 5, 2015 at 9:49 am
TomThomson (11/4/2015)
SP......... cached_time............exec count.. AvWorkerTime.. tot_wt...min_WT.. max_WT...AvElapsedTime. .tot_ET.. min_ET.....
November 4, 2015 at 4:39 pm
TomThomson (11/3/2015)
So it seems that it is possible for use of NOLOCK to make a query run slower, instead of faster.
Thank you for all the work here, but I think...
November 3, 2015 at 5:44 pm
Viewing 15 posts - 1 through 15 (of 65 total)