Re: Query optimization and index suggestion needed
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.
Subject
Views
Written By
Posted
757
September 09, 2020 10:01AM
Re: Query optimization and index suggestion needed
436
September 09, 2020 10:34AM
399
September 09, 2020 01:08PM
414
September 09, 2020 02:36PM
375
September 09, 2020 11:38PM
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.