MySQL Forums
Forum List  »  Newbie

Re: Query optimization and index suggestion needed
Posted by: Peter Brawley
Date: May 25, 2020 09:12AM

Let's see the MySQL version, innodb_buffer_pool_size, no. of rows in `sales`, a few sample rows of data, and the results of ...

Show Table sales;
.
... and of Explain Extended on the query..

The 2nd Case needlessly repeats a test on year=2020, needs some optimising.

Is Only_Full_Group_By unset? Unless channel_name, index_code, index_label, index_id are fully determined by channel_id, returned values for those columns will be arbitrary, so they ought to be Grouped By.

Options: ReplyQuote




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.