Re: How can I improve this table and query
Hi,
Does adding an index on products(brand) help?
Both the original plan, and the new one you got, will have to check all rows of transaction_data. I am thinking that in order for the query to execute faster, you need some way to access only a subset of the transactions. With an index on brand, the optimizer will hopefully decide to process the products table of the subquery first. That should hopefully reduce the amount of data that need to be accessed since only rows for the given brand will be joined with the other tables.
Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway
Subject
Views
Written By
Posted
2030
February 17, 2016 04:49AM
939
February 17, 2016 06:07AM
1043
February 17, 2016 08:25AM
798
February 17, 2016 08:26AM
Re: How can I improve this table and query
869
February 17, 2016 08:51AM
1404
February 17, 2016 09:03AM
853
February 21, 2016 11:14PM
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.