Also, these are the indices that I found on a ZC 1.5.3 install:
Code:
Keyname |
Type |
Cardinality |
Field |
PRIMARY |
PRIMARY |
18 |
orders_id |
idx_status_orders_cust_zen |
INDEX |
18 |
orders_status |
orders_id |
customers_id |
idx_date_purchased_zen |
INDEX |
18 |
date_purchased |
idx_cust_id_orders_id_zen |
INDEX |
18 |
customers_id |
orders_id |
So basically like the idx_status_orders_cust_zen index gets used when the query has WHERE orders_status = xxx and orders_id = yyy and customers_id = zzz, so yes by using the date_purchased field first at least one index is used...
But, it seems that the queries that are taking the longest are ones that don't really limit the results, but instead ask for all orders that are in the past.
Bookmarks