Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-25216

This Query is preventing restaurants from creating Purchase Orders (Review Query)

    Details

    • Type: Customer Defect
    • Status: Need More Info (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: CFA 2023R1
    • Fix Version/s: None
    • Component/s: Ordering
    • Labels:
      None
    • VTask #:
      VTASK0513775

      Description

      On 04/11/2023 CFA reported the same issue as Friday evening 04/07/2023 (unable to place orders)

      Escalations: #zendesk-3480963, #zendesk-3476932.

      DB team said:

      SQL seems ok but seeing the following query running multiple times and taking up to 16min to complete

      Same issue as last - MXC_Forecast_GetOrderItemForecastByDateRangeWithProcessingTimes

      INSERT INTO @tmp (InventoryItemId, ServiceType, RawTransactionCount, SystemTransactionCount, ManagerTransactionCount, LastYearTransactionCount)
      	SELECT i.InventoryItemId
      		, i.ServiceType
      		, SUM(i.RawTransactionCount) AS RawTransactionCount
      		, SUM(i.SystemTransactionCount) AS SystemTransactionCount
      		, SUM(i.ManagerTransactionCount) AS ManagerTransactionCount
      		, SUM(i.LastYearTransactionCount) AS LastYearTransactionCount
      	FROM @tmpForecast f
      	JOIN [Forecasting].[InventoryItemMetricDetail] i ON ( f.ForecastId = i.ForecastId )
      	AND i.IntervalStart BETWEEN @startDate AND @endDate
      	AND i.InventoryItemId NOT IN (SELECT ItemId FROM [dbo].[tbEntityItem] WHERE EntityId = @entityId AND UseProcessingTime = 1 AND ProcessingTime > 0)
      	GROUP BY i.InventoryItemId, i.ServiceType
      

      They Killed off requests and recompiled the sp

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wesam.el-gendy Wesam El-Gendy
                Reporter:
                wesam.el-gendy Wesam El-Gendy
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.