SQL result

Host: localhost
Database: xxxxx
Generation Time: Oct 23, 2006 at 01:53 PM
Generated by: phpMyAdmin 2.9.0-rc1 / MySQL 5.0.24a-standard-log
SQL query: explain SELECT count(op.products_id) as attr_cnt, o.orders_id, opa.orders_products_id, opa.products_options, opa.products_options_values, opa.options_values_price, opa.price_prefix from orders_products_attributes opa, orders o, orders_products op WHERE o.orders_id = opa.orders_id AND op.orders_products_id = opa.orders_products_id AND o.date_purchased >= '2006-10-18T00:00:00' AND o.date_purchased < '2006-10-19T00:00:00' AND op.products_id = 179 GROUP BY products_options_values ORDER BY orders_products_id;
Rows: 3

No Index

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE opa ALL NULL NULL NULL NULL 20978 Using temporary; Using filesort
1 SIMPLE o ref PRIMARY,date_purchased,orders_id_date orders_id_date 4 opa.orders_id 1 Using where; Using index
1 SIMPLE op eq_ref PRIMARY,products_id PRIMARY 4 opa.orders_products_id 1 Using where


Index on order_products_id

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE op ref PRIMARY,products_id products_id 4 const 68 Using temporary; Using filesort
1 SIMPLE opa ref orders_products_id orders_products_id 4 op.orders_products_id 2  
1 SIMPLE o eq_ref PRIMARY,date_purchased,orders_id_date PRIMARY 4 opa.orders_id 1 Using where