Viewing 15 posts - 736 through 750 (of 6,036 total)
3 obvious problems from the plans:
1) Key lookup on 240k recordset (Object3). Certainly wrong choice of the clustered index.
2) 4.3 mil rows scanned from Object4.Index4 only to...
December 5, 2017 at 6:42 pm
As I said - it was only 1 randomly chosen piece of the query, picked only because I stopped scrolling through the query to take a sip of coffee.
Every other...
December 1, 2017 at 12:38 pm
From somewhere inside the query:
FROM [dbo].[FctCoverageLengthDetail]WHERE CASE
WHEN([CoverageLengthMonthNumber]=13 or[CoverageLengthMonthNumber] =25 or[CoverageLengthMonthNumber] =37 or[CoverageLengthMonthNumber] =49
or[CoverageLengthMonthNumber] =61 or[CoverageLengthMonthNumber]...
November 30, 2017 at 4:07 pm
November 30, 2017 at 3:04 pm
sgmunson - Thursday, November 30, 2017 2:32 PMBrain is not working so well today.
At least you have one...
🙂
November 30, 2017 at 2:50 pm
No, it won't miss them.
Because of LEFT join all the treatments which are not in the base set will be simply omitted.
November 30, 2017 at 1:17 pm
See if it makes sense:
create table #PatientTreatment (
patientID int,
TreatmentID int
)
insert into #PatientTreatment
select 1, 111
union
select 1, 222
union
November 30, 2017 at 4:59 am
If returned sets are always filtered by PVID you may use this trick:
CustomData = ROW_NUMBER() OVER (PARTITION BY PVID ORDER BY (SELECT NULL))
November 30, 2017 at 2:17 am
The query returns every single record from the "Allocations" table joined to every single relevant record in lookup tables.
Since you've got no record filtering, it may be only table...
November 29, 2017 at 11:46 pm
I'd assume that "birthdays next month" is not only kind of queries which might be performed in the company.
I'd expect also "birthdays next week", "birthdays on Chritmas holidays", etc.
November 29, 2017 at 4:38 am
If finding rows by birth month without regard to year or day is something...
November 23, 2017 at 1:46 am
November 15, 2017 at 5:58 pm
Ok, from what you're saying I can see several key issues.
1. It's all in a single table . Big mistake. Huge.
Manufacturer references, vendor catalogue data, sales qty and pricing, reps...
November 15, 2017 at 2:34 pm
Are you trying to tell that the query
INSERT INTO #ChangeProducts ()
SELECT ...
FROM Joined Tables
With no WHERE filter
Performs better and applies less intensive locking than
SELECT ...
FROM Joined...
November 15, 2017 at 7:08 am
Viewing 15 posts - 736 through 750 (of 6,036 total)