perf: Add indexes in stock queries and speed up bin updation #27758

perf: Add indexes in stock queries and speed up bin updation
This commit is contained in:
Deepesh Garg
2021-10-12 20:15:55 +05:30
committed by GitHub
parent 8d69ec72a6
commit 6f107da165
6 changed files with 91 additions and 57 deletions

View File

@@ -591,7 +591,7 @@ def future_sle_exists(args, sl_entries=None):
data = frappe.db.sql("""
select item_code, warehouse, count(name) as total_row
from `tabStock Ledger Entry`
from `tabStock Ledger Entry` force index (item_warehouse)
where
({})
and timestamp(posting_date, posting_time)