Viewing 15 posts - 886 through 900 (of 1,825 total)
Try This as your view definition...
CREATE VIEW [PM].[vw_PatInfoData]
AS
SELECT
Patient_ID,
min(Case when Entry_Sequence= 1 then INFO1.Field_Value else Null end)AS Field1,
min(Case when Entry_Sequence= 2 then INFO1.Field_Value else Null end )AS Field2,
min(Case when Entry_Sequence= 3...
May 10, 2010 at 8:43 am
Whats the Patient_info_field table ? Its table scanning , is there no indexes on that ?
Can you post the view definition to ?
May 10, 2010 at 8:13 am
Hmm the Optimizer is timing out. Reason for early Termination = "Time Out".
If you remove the view does it execute ok ?
Try an outer apply to the view.
--Tried to...
May 10, 2010 at 7:57 am
GetDate() contains a time portion to , you will need to account for that in your comparison
May 10, 2010 at 6:37 am
I try to run a query remotely to that server.It sometimes runs well but then often I get an Transport level error
To me this is more telling that the replication...
May 10, 2010 at 1:38 am
sk.sarim (5/10/2010)
while creating a view use nolock in ur create view statement, and then try it. for ex:
CREATE VIEW...
May 10, 2010 at 1:12 am
Wow, bad advice from first and only post , is this some form of record 🙂
May 10, 2010 at 1:10 am
By fairly simply passing it through and also 'partitioning' on it
With CteRows
as
(
select Account, ServiceCode,ConsumptionVal ,TranDate, RowID,ROW_NUMBER() over(PARTITION by Account, ServiceCode order by RowID desc) as Rown
...
May 7, 2010 at 8:40 am
Assuming that is it just the parsing / optimization phase that is taking the time , then try giving SQLServer ALL the information you can.
...
May 7, 2010 at 8:37 am
Something like this ?
With CteRows
as
(
select Account,ConsumptionVal ,TranDate, RowID,ROW_NUMBER() over(PARTITION by Account order by RowID desc) as Rown
from <yourtable>
)
Select Account,min(case when...
May 7, 2010 at 8:06 am
ahhhhhhhhh , Sorted.....
The full schema has two "Occupancy" nodes.
So to distinguish , it has given the "full path". Doh...
May 7, 2010 at 1:49 am
It does sound like a parameter sniffing or statistics issue, if you have followed the advice in the SO question it should of sorted it.
Can you post the execution...
May 7, 2010 at 1:21 am
Viewing 15 posts - 886 through 900 (of 1,825 total)