perf: Order by name instead of parent (#17404)
Changing the order by column reduced the query time from 60s to 12s
This commit is contained in:
parent
9f660267c1
commit
61b4afc3c5
@ -62,7 +62,7 @@ class ItemVariantsCacheManager:
|
|||||||
|
|
||||||
item_variants_data = frappe.db.get_all('Item Variant Attribute',
|
item_variants_data = frappe.db.get_all('Item Variant Attribute',
|
||||||
{'variant_of': parent_item_code}, ['parent', 'attribute', 'attribute_value'],
|
{'variant_of': parent_item_code}, ['parent', 'attribute', 'attribute_value'],
|
||||||
order_by='parent',
|
order_by='name',
|
||||||
as_list=1
|
as_list=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user