Production Ticket(ST) #10898
Goldcrest-Loading for a long time
Issue has been resolved and portal able to show report data.
Root cause : Query Performance Issue
None
Description
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