SELECT
The FROM Cmdt
WHERE IS_PATIENT=0
AND (
STATUS='SCHEDULED'
The OR STATUS='AWAITING'
)
AND END_DATE & gt; NOW ()
SELECT
The FROM Cmdt
WHERE IS_PATIENT=0
The AND STATUS='SCHEDULED'
AND END_DATE & gt; NOW ()
SELECT
The FROM C_mdt
WHERE the STATUS='SCHEDULED'
AND RESERVATION_ID='66'
CodePudding user response:
Only from the point of view of query, two composite indexIS_PATIENT, status, END_DATE
The STATUS, RESERVATION_ID