AS
The SELECT Amy polumbo ATIENT_ID AS PATIENT_NO, a.O RDER_NO AS TEST_NO,
B. EEITEM_NAME AS SUBJECT, a.S AMPLE_TYPE,
A. d. IAGNOSE AS CLINIC_DIAG, a.S OURCE_DOCTOR AS REQUEST_DOCTOR,
A.O RDER_DATE AS REQUEST_DATE, a.t est_date AS EXECUTE_DATE, al-qeada ENDER,
A.A GE, a.A GE_UNIT, a.O RDER_NO,
Amy polumbo ATIENT_NAME AS PATIENT_NAME
, d. id number inside the as patient_id
The FROM dbo. TB_CURRENT_SAMPLE_INFO a
Left the join [192.168.0.2] hisdbsq. Dbo. His_To_Lis_PatInfo d on
(Amy polumbo ATIENT_ID=d. outpatient number or Amy polumbo ATIENT_ID=d. hospitalization)
INNER JOIN
Dbo. TB_CURRENT_SAMPLE_FEE b ON a.S AMPLE_NO=b.S AMPLE_NO AND
A.S AMPLE_DATE=b.S AMPLE_DATE AND
Anderson NSTRUMENT=b.I NSTRUMENT
WHERE Dr. ALIDATE_FLAG='2'
And a.S AMPLE_DATE & gt; 30
=GETDATE () -
And d. one cartoon internal number='20200523000 eh'
CodePudding user response:
Such as online!!!!!!!!!!CodePudding user response:
Too many reasons, first check the d column index, if not, set up first,CodePudding user response:
I direct the select * from [192.168.0.2] hisdbsq. Dbo. His_To_Lis_PatInfo where one cartoon internal number='20200523000 eh is not slowCodePudding user response:
Amy polumbo ATIENT_ID=d. outpatient number or Amy polumbo ATIENT_ID=d. in the hospital, you don't have the or, with a condition of separate first try slow slow, premise is, of course, the index is built on the associated conditions,CodePudding user response:
Also slowly, not the problemCodePudding user response:
Look at the execution plan, and see where is slow, and then analysis and optimization,CodePudding user response:
Just see the execution plan, according to the remote query overhead by 96%, I directly select * from [192.168.0.2] hisdbsq. Dbo. His_To_Lis_PatInfo where one cartoon internal number='20200523000 eh it also calculate remote query is not slowCodePudding user response:
CodePudding user response: