Re: Query optimization to reduce execution time.
Posted by:
Rick James
Date: September 22, 2014 08:46PM
Oh, that is a messy schema.
Try adding these compound indexes:
product: INDEX(status, country_id)
category_label: INDEX(country_id, label_id)
product_label: INDEX(label_id, product_id), INDEX(product_id, label_id)
category: INDEX(id, lft, rgt)
I don't know if they will help, but they will give the optimizer some more options.
This combination in product_label feels wrong; that is going on?:
`label_id` int(11) NOT NULL,
`label_value` varchar(1200) DEFAULT NULL,
> int(4)
Perhaps you mean TINYINT UNSIGNED?
Does `category` have the same schema as the table categoryMaster?
Subject
Views
Written By
Posted
2068
September 22, 2014 07:33AM
Re: Query optimization to reduce execution time.
969
September 22, 2014 08:46PM
776
September 23, 2014 12:38AM
916
September 23, 2014 01:42AM
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.