Knowledgebase: AbleCommerce
Able Gold-Slow load on admin page when you first log on
Posted by Judy Estep on Oct 20 2014 06:32

I have mentioned to Able that I had taken off the recent orders sections on some admin pages because it took so long for the page to come up when an admin logs in. Here is a change they suggested:

FYI I have updated the recent orders control query to use the indexes we already have. The code changes are simple and limited to one line of code, so you can make these changes manually to improve the performance:

Edit the file ~/Admin/Dashboard/RecentOrders.ascx.cs and locate this line of code under Page_Load function:

IList<Order> orders = OrderDataSource.LoadAll(5, 0, "OrderDate DESC");

And replace with:

IList<Order> orders = OrderDataSource.LoadForStore(AbleContext.Current.StoreId, 5, 0, "OrderDate DESC");

We already have a composite index for (StoreId, OrderDate) columns for ac_Orders table. The updated query will result significant improvement in performance for large databases.

Comments (1)
Judy Estep
Oct 20 2014 06:57
This requires using CommerceBuilder.Common;