Viewing 15 posts - 5,581 through 5,595 (of 7,608 total)
SELECT DISTINCT m1.*
FROM Matches m1
WHERE
EXISTS(
SELECT 1
FROM Matches m2
...
December 4, 2014 at 10:14 am
SELECT time_int, CAST(DATEADD(MINUTE, time_int / 100 * 60 + time_int % 100, 0) AS time) AS time
FROM (
SELECT 0 AS time_int UNION ALL
...
December 4, 2014 at 10:07 am
If you (almost) always do lookups on the table based on "businessid", then cluster the table on businessid. If you need to keep the PK, make the PK nonclustered...
December 4, 2014 at 10:02 am
BWFC (12/4/2014)
ScottPletcher (12/3/2014)
BWFC (11/27/2014)
One other thing, be careful using BETWEEN for date range queries. You're usually better using
where
[Date] >= @startdate
and
[Date] <= @enddate
Have a look at...
December 4, 2014 at 8:57 am
If you're not using service broker any more, then it's 100% safe to run this:
ALTER DATABASE msdb SET NEW_BROKER
which should clear that table and allow you to release the space.
December 3, 2014 at 3:43 pm
BWFC (11/27/2014)
One other thing, be careful using BETWEEN for date range queries. You're usually better using
where
[Date] >= @startdate
and
[Date] <= @enddate
December 3, 2014 at 12:01 pm
To avoid rows already being modified, you can use the READPAST hint. That's often used for work-queue-type processing. If you can use that, there's no good reason to...
December 3, 2014 at 11:57 am
Ok, let's see what this shows:
IF OBJECT_ID('tempdb.dbo.#showfilestats') IS NOT NULL
DROP TABLE #showfilestats
CREATE TABLE #showfilestats (
Fileid smallint NOT NULL,
FileGroup...
December 3, 2014 at 11:28 am
417 pages is a trivial size, you can ignore it if that's the total.
Does "DB size shows 215 GB" include log file? If so, what size is the log...
December 3, 2014 at 10:59 am
I suggest RECOMPILE as well. That may take some time, but it will be trivial compared to a terrible plan.
Also, if you leave auto stats update on, explicitly set...
December 3, 2014 at 10:50 am
SQL also creates internal tables for certain types of data, including: primary XML indexes,
service broker, change tracking and a few other things. You'll need to include the size...
December 3, 2014 at 10:44 am
Robert Frasca (12/2/2014)
Grant Fritchey (12/2/2014)
ScottPletcher (12/2/2014)
Robert Frasca (12/2/2014)
ScottPletcher (12/2/2014)
Robert Frasca (12/2/2014)
ScottPletcher (12/1/2014)
I suggest creating a covering index on:
SourceFactTimeCard (...
December 2, 2014 at 12:00 pm
Robert Frasca (12/2/2014)
ScottPletcher (12/2/2014)
Robert Frasca (12/2/2014)
ScottPletcher (12/1/2014)
I suggest creating a covering index on:
SourceFactTimeCard ( TimecardIndex, EmployeeID )
If SQL then...
December 2, 2014 at 10:36 am
eric.notheisen (12/2/2014)
December 2, 2014 at 9:07 am
Robert Frasca (12/2/2014)
ScottPletcher (12/1/2014)
I suggest creating a covering index on:
SourceFactTimeCard ( TimecardIndex, EmployeeID )
If SQL then uses that covering...
December 2, 2014 at 8:43 am
Viewing 15 posts - 5,581 through 5,595 (of 7,608 total)