MySQL Forums
Forum List  »  Optimizer & Parser

[HELP] Subquery Optimization
Posted by: Pinoy Central
Date: May 28, 2014 08:56PM

Hi, Ive'd seen this article (http://dev.mysql.com/doc/refman/5.6/en/subquery-optimization.html) and hoping that this article will fix my slow query. I want it to apply this in my statement but please help me how do I do it. Here is my statement.

SELECT DISTINCT product.class_code, product.fitting_code, product.running_number, product.color_code, color_codes.color_desc, retail_price, isActive, b26, b27, b28, b29, b30, b31, b32, b33, b34, b36, b38, b40, b42, b44, tFS, tS, tM, tL, tXL, t2XL, t3XL, t4XL, t5XL, DATE_FORMAT(last_incoming, '%Y-%m-%d'), DATE_FORMAT(last_outgoing, '%Y-%m-%d') FROM product, stock_levels, color_codes WHERE product.class_code = stock_levels.class_code AND product.fitting_code = stock_levels.fitting_code AND product.running_number = stock_levels.running_number AND product.color_code = stock_levels.color_code AND product.color_code = color_codes.color_code AND stock_levels.color_code = color_codes.color_code;

Options: ReplyQuote


Subject
Views
Written By
Posted
[HELP] Subquery Optimization
2416
May 28, 2014 08:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.