Piwik API call really slow

localhost:8080/module=API&format=JSON&token_auth=random&date=last604&idSite=1&pageUrl=https:/url.com&method=Actions.get&period=day

Making an API call like the one above takes more than 5 secs. We have the latest piwik 2 on our server. The site probably gets no more than 10,000 views per month. I have being doing a bulk request for multiple urls using the same call as above and that takes forever to respond.

I have deleted all the archive tables and re-ran the archiver. That seemed to help a bit but it’s still not enough. What am I doing wrong?

Please upgrade to Piwik 3 and then follow instructions on How to Set up Auto-Archiving of Your Reports - Analytics Platform - Piwik