Files
erpnext/erpnext
mergify[bot] 091c2f3023 fix(perf): index creation on voucher_detail_no (#27866) (#27875)
voucher_detail_no is supposed to have an index, it was added on
on_doctype_update function of table, however this function is only
called if DocType itself is updated and `on_update` is called on
DocType. Stock ledger Entry doctype hasn't changed since addition of
this index in function.

Before: Lack of this index was causing full table scan in
get_future_sle_to_fix function. (~50 seconds in a reposting job)

After: Single row is fetched (~0.5 second in full reposting job)

Learnings:
1. Add simple indexes via doctype only
2. For complex indexes always change doctype.json file for it to take
   effect.

(cherry picked from commit 6019f60d0a)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-08 17:19:41 +05:30
..
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30
2021-09-03 18:57:43 +05:30