So the maximum size PHP is allowed to allocate exceeded 128 MB. This means you have quite a large amount of queries in the database. Unfortunately, there isn't much we can do for you here as the reading from the database itself is the issue.
This will be solved once we switch over to Pi-hole v6.0 as the next generation API and web interface as the new API is more clever. However, we do not even have a coarse ETA for this revolutionary endeavor. The new code works as such, but it has quite a ways to go as it is not even close near to feature completion.
Why would you need a full 7 day's query log?
Does the same time range work for the Top Lists?