MySQL Forums
Forum List  »  Performance

Re: Query optimization and index suggestion needed
Posted by: Peter Brawley
Date: September 09, 2020 10:34AM

To estimate how much time is eaten up by Select expression complexities (which will be little helped by indexes), how much time does this query take?

SELECT cust_id, SUM(gross_amount)
FROM sales_report FORCE INDEX index sr_mv_custid_clntnum_customer_rptdte_grssamnt
WHERE report_date between '2019-01-01' and '2020-09-07'
GROUP BY cust_id ;

Assuming the table is InnoDB, what is innodb_buffer_pool_size, and how much RAM is there?

Do you have a MySQL 8.0 installation where you can experiment with this query?

Those Select expression complexities look to me like candidates for precomputing to an intermediate report table or cube.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Query optimization and index suggestion needed
170
September 09, 2020 10:34AM


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.