Update USP_GET_CRM_INTEGRATION_STATS to be more efficient using a union

The integration in BBIS that checks to see how many email records are currently waiting to be synchronized can be changed slightly and be much more efficient. It is worth noting that we believe that this call has negatively impacted our large email sends when being run concurrently. The change consists of switching one of the underlying queries to be a UNION between two sets, as opposed to a query with an "or" condition. I'm attaching the proposed change to stored procedure.

  • Greg Harmelink
  • Dec 13 2021
  • Reviewed: Voting Open
  • Attach files