Project

General

Profile

Production Ticket(ST) #10898

Goldcrest-Loading for a long time

Added by Muhammed Azhar Mohamed Maideen 8 months ago. Updated 7 months ago.

Status:
Ticket Resolved
Priority:
P3 - Medium
Start date:
02/02/2024
Due date:
08/02/2024
% Done:

90%

Estimated time:
Spent time:
Job Remark:
Ticket Logged Date:
02/02/2024
Ticket No.:
Related Ticket ID:
Type:
Support Request
SLA Initial Response:
02/02/2024
SLA Delivery:
Esclation Time:
02/02/2024
Issue Reoccurance#:
Actual Initial Response:
02/02/2024
Resolution:

Issue has been resolved and portal able to show report data.
Root cause : Query Performance Issue

Requester ExpectedDeliveryDate:
Delay Justification:
Priority Seq:
Effort (Hour):
External Ticket #:

None


Description

WhatsApp Image 2024-02-01 at 17.07.19.jpeg (42.5 KB) WhatsApp Image 2024-02-01 at 17.07.19.jpeg Muhammed Azhar Mohamed Maideen, 02/02/2024 03:19 PM

History

#1 Updated by Muhammed Azhar Mohamed Maideen 8 months ago

  • Status changed from Assigned To to Support In Progress

#2 Updated by Muhammed Azhar Mohamed Maideen 8 months ago

  • Status changed from Support In Progress to Escalate to 2nd Level Support
  • Assignee changed from Muhammed Azhar Mohamed Maideen to Muhammed Assyafiq Bin Ahmad Kamal

#3 Updated by Muhammed Assyafiq Bin Ahmad Kamal 7 months ago

  • Status changed from Escalate to 2nd Level Support to Support In Progress
  • Assignee changed from Muhammed Assyafiq Bin Ahmad Kamal to Muhammed Azhar Mohamed Maideen
  • % Done changed from 0 to 90

Find out this query logic taking long time to run :

select * from #temp_mobile_txn_stock_count l1
left join #temp_mobile_txn_stock_count l2 on l1.row_no =l2.row_no + 1 and l1.customer_id=l2.customer_id and l1.product_id=l2.product_id
left join #temp_mobile_txn_stock_count l3 on l2.row_no =l3.row_no + 1 and l2.customer_id=l3.customer_id and l2.product_id=l3.product_id

Replace with below :

WITH OrderedTemp AS (
SELECT ,
LEAD OVER (PARTITION BY customer_id, product_id ORDER BY row_no) AS next_row_no
FROM #temp_mobile_txn_stock_count
)
SELECT l1.
,
l2.*,
l3.*
FROM OrderedTemp l1
LEFT JOIN OrderedTemp l2 ON l1.row_no = l2.next_row_no
LEFT JOIN OrderedTemp l3 ON l2.row_no = l3.next_row_no;

Issue has been resolved and portal able to show report data. Escalate back to Azhar to verify with user on the resolution.

Root cause : Query Performance Issue

#4 Updated by Muhammed Azhar Mohamed Maideen 7 months ago

  • Status changed from Support In Progress to Pending Client Verification
  • Resolution updated (diff)

#5 Updated by Muhammed Azhar Mohamed Maideen 7 months ago

  • Status changed from Pending Client Verification to Ticket Resolved
  • Type set to Support Request
  • Esclation Time set to 02/02/2024
  • Actual Initial Response set to 02/02/2024

Also available in: Atom PDF