Data-Diggers.com | Zen Cart Optimization, Performance and A/B Split Testing Modules for Zen Cart

Jun/09

29

Speed up admin/orders.php page

There’s suboptimal query in admin/orders.php page which retrieves information about last orders. Unfortunately query is constructed in such way that MySQL scans whole orders, orders_products and orders_total table. As always it’s not a problem until orders table gets big ( for example 50 000 entries ). If You happen to have at least 10 000 orders ( I wish You that ;) ), You probably get impatient each time You request admin/orders.php page.

Good news is that there is quick fix. Just add index on (orders_id, class) on orders_total table to speed up the query. Here’s MySQL statement which does that for You:

ALTER TABLE orders_total ADD INDEX idx_oid_class(orders_id, class)

The query is still suboptimal, but at least its quite fast until orders table gets really big (500 000 orders? It’ll depend on Your server).

RSS Feed

No comments yet.

Leave a comment!

Spam protection by WP Captcha-Free

<<

>>

Find it!

Theme Design by devolux.org