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:

and