In order to help with this issue we need more information.
1. What database are you using?
2. What version of php are you using?
3. What version of our application are you using?
4. Where you do specifically see the slowness?
- And how slow is it?
5. Are you using the base configuration for mysql? (if you are using mysql)
- For this please reference this link https://www.percona....r-installation/
6. Are you setting any expiration dates for actions?
7. What is your throughout-put from your database to your server? (assumably they are on separate servers).