title: Oracle SQL query SELECT MINUS SELECT not working or too slow
body: <p>I do not understand why the following Oracle 10g SQL query is not working although each sub-query is working fine and fast on its own:</p>
  
  <pre><code>SELECT ref.EWO_ISSUE_ID, ref.EWO_REF_ID, ref.MSN_ID, ref.MSN, ref.HOV, ref.RANK, 
  ref.EWO_WP_ID, ref.EWO_WP, ref.EPAC_TDU, ref.MOD, ref.MP, ref.EWO_REF_DESCRIPTION, 
  ewo.EWO1, ewo.EWO2, ewo.EWO3, ref.TRS_ISSUE, ref.TRS_UPDATE_ON_SHEET_1, 
  ref.TRS_UPDATE_ON_SHEET_2, ref.TRS_UPDATE_ON_SHEET_3,
  ref.TRS_UPDATE_ON_SHEET_4, ref.TRS_UPDATE_ON_SHEET_5, ref.TRS_UPDATE_ON_SHEET_6,
  ref.TRS_TECHDOM_INFO
  FROM V_EWO_ACTUAL_REFERENCE ref
  LEFT JOIN EWO_REFERENCE ewo
  ON ref.EWO_REF_ID = ewo.EWO_REF_ID
  WHERE ref.EWO_REF_ID IS NOT NULL
  AND ref.TRS_TECHDOM_INFO IS NOT NULL
  
  MINUS
  
  SELECT EWO_ISSUE_ID, EWO_REF_ID, MSN_ID, MSN, HOV, RANK, EWO_WP_ID, EWO_WP,
  EPAC_TDU, MOD, MP, EWO_REF_DESCRIPTION, EWO1, EWO2, EWO3, TRS_ISSUE,
  TRS_UPDATE_ON_SHEET_1, TRS_UPDATE_ON_SHEET_2, TRS_UPDATE_ON_SHEET_3,
  TRS_UPDATE_ON_SHEET_4, TRS_UPDATE_ON_SHEET_5, TRS_UPDATE_ON_SHEET_6,
  TRS_TECHDOM_INFO
  FROM EWO_REF_TRS_HISTORY;
  </code></pre>
  
  <p>I only get a time out error because it takes very long. Has anyone an idea what could be wrong?</p>