Re: Query optimization and index suggestion needed
Posted by:
Pandit P
Date: September 09, 2020 11:38PM
Thanks Mr. Peter Brawley,
SELECT cust_id, Left(report_date,7) as YrMo, 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, YrMo;
This query is taking 31 seconds.
I will think about precomputing the Working_Days instead of using the function also check innodb_buffer_pool_size.
Regards
Praveen
Subject
Views
Written By
Posted
760
September 09, 2020 10:01AM
440
September 09, 2020 10:34AM
401
September 09, 2020 01:08PM
416
September 09, 2020 02:36PM
Re: Query optimization and index suggestion needed
376
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.