Decrease API loading time

Hello Community
Im having a heavy load time when i request reports from matomo specially when i use segements

im doing a master/slave architecture on the database, could this help me ?
if not what will help me ?

Have a look at:

And especially at:
https://matomo.org/docs/setup-auto-archiving/
and
https://matomo.org/faq/general/faq_38/#faq_38