perf: Order by name instead of parent (#17404)
Changing the order by column reduced the query time from 60s to 12s
diff --git a/erpnext/portal/product_configurator/item_variants_cache.py b/erpnext/portal/product_configurator/item_variants_cache.py
index 458c229..f17639c 100644
--- a/erpnext/portal/product_configurator/item_variants_cache.py
+++ b/erpnext/portal/product_configurator/item_variants_cache.py
@@ -62,7 +62,7 @@
item_variants_data = frappe.db.get_all('Item Variant Attribute',
{'variant_of': parent_item_code}, ['parent', 'attribute', 'attribute_value'],
- order_by='parent',
+ order_by='name',
as_list=1
)