title: Union Query taking hours to run
body: <p>I have a UNION query that is combining about 28 queries. Is it normal for it to take hours? I can run them separately in about 20-30 min. Below is a snippet of my code. Sorry if its messy.</p>
  
  <pre><code>SELECT DISTINCT AP_CA_WM_Patrol.SID, [HR_Report].[Full_Nm]AS Name, 0 AS [Licensed and Registered (1= Yes; 0= No)], 0 AS [Antitrust (1= Yes; 0= No)], 0 AS [MFP (1= Yes; 0= No)], 0 AS [Doddfrank AP (1= Yes; 0= No)], 0 AS [FX_Trader (1= Yes; 0= No)], 0 AS [FX_Sales (1= Yes; 0= No)], 0 AS [OTA (1= Yes; 0= No)]
  FROM AP_CA_WM_Patrol, HR_Report ,AM_L_R,AWM_L_R,APAC_L_R,EMEA_L_R,EMEA_L_R_Certified,LATAM_L_R,Antitrust,MFP,DoddFrank
  WHERE (((AP_CA_WM_Patrol.SID)=[HR_Report].[Standard_Id]) AND ((AP_CA_WM_Patrol.[Business Level 1])="ASSET &amp; WEALTH MANAGEMENT")
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[AM_L_R].[Username])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[AWM_L_R].[id_sid])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[APAC_L_R].[SID])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[EMEA_L_R].[SID])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[EMEA_L_R_Certified].[SID])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[LATAM_L_R].[UNID])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[Antitrust].[SIDs])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[MFP].[SID])
  AND
  ((AP_CA_WM_Patrol.SID)&lt;&gt;[Doddfrank].[SID]))
  
  
  UNION
  
  SELECT DISTINCT AP_CA_WM_SWAP.SID, [HR_Report].[Full_Nm]AS Name, 0 AS [Licensed and Registered (1= Yes; 0= No)], 0 AS [Antitrust (1= Yes; 0= No)], 0 AS [MFP (1= Yes; 0= No)], 0 AS [Doddfrank AP (1= Yes; 0= No)], 0 AS [FX_Trader (1= Yes; 0= No)], 0 AS [FX_Sales (1= Yes; 0= No)], 0 AS [OTA (1= Yes; 0= No)]
  FROM AP_CA_WM_SWAP,HR_Report,AM_L_R,AWM_L_R,APAC_L_R,EMEA_L_R,EMEA_L_R_Certified,LATAM_L_R,Antitrust,MFP,DoddFrank 
  WHERE (((AP_CA_WM_SWAP.SID)=[HR_Report].[Standard_Id]) AND ((AP_CA_WM_SWAP.[Business Level 1])="“Asset" &amp; "Wealth Management”")
  And
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[AM_L_R].[Username])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[AWM_L_R].[id_sid])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[APAC_L_R].[SID])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[EMEA_L_R].[SID])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[EMEA_L_R_Certified].[SID])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[LATAM_L_R].[UNID])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[Antitrust].[SIDs])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[MFP].[SID])
  AND
  ((AP_CA_WM_SWAP.SID)&lt;&gt;[Doddfrank].[SID]))
  
  UNION
  
  SELECT DISTINCT APAC_L_R.SID, [HR_Report].[Full_Nm]AS Name, 1 AS [Licensed and Registered (1= Yes; 0= No)], 0 AS [Antitrust (1= Yes; 0= No)], 0 AS [MFP (1= Yes; 0= No)], 0 AS [Doddfrank AP (1= Yes; 0= No)], 0 AS [FX_Trader (1= Yes; 0= No)], 0 AS [FX_Sales (1= Yes; 0= No)], 0 AS [OTA (1= Yes; 0= No)]
  FROM APAC_L_R, HR_Report
  WHERE (((APAC_L_R.SID)=[HR_Report].[Standard_Id]));
  </code></pre>