Query is not using Index

2011-01-18 Thread Yogesh Kore
', SUM(if (px_orders.sales_orders.order_completed_date >= DATE_SUB(CURDATE( ),INTERVAL DAYOFYEAR(CURDATE( ))-1 DAY),px_orders.sales_order_products.paid_amount,0))) as ytd FROM px_orders.sales_order_products LEFT JOIN px_orders.sales_orders ON px_orders.sales_order_products.order_id = px_orders.

RE: Why the query is not using index?

2003-07-28 Thread Rob A. Brahier
efore it can check if that value is less than 500. -Rob -Original Message- From: Karam Chand [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 3:51 PM To: [EMAIL PROTECTED] Subject: Why the query is not using index? Greetings Having a table with the following stru

Why the query is not using index?

2003-07-28 Thread Karam Chand
--+-+ the KEY column is NULL i.e. it is not using Index? Why the query is not using index? Thanks in advance. Karam __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- MySQL Gen