MySQL Forums
Forum List  »  Optimizer & Parser

Re: how to speed up query on a table with over 20million records?
Posted by: Peter Brawley
Date: March 25, 2018 03:04PM

Innodb_buffer_pool_size will be important, but on a second reading I notice, in the trace for the first query, "group_attribute_not_prefix_in_index", so try either changing the PK to (symbol_id,time_period,datetime), or if that's not feasible then add that index, in order to allow MySQL to use that key for the Group 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.