Add option to clear DB and set DB storage length

MAXDBDAYS=365 (Configuration - Pi-hole documentation)

How long should queries be stored in the database? Setting this to 0 disables the database

For users using a raspberry pi, having a big DB can slow things down so it would be nice to be able to easily clear the DB and set a new max length of time it stores results so it doesn't get too full. Can easily get it added to the [admin/settings] page.

How so?

I couldn't even search a query without it locking up, forcing me to close the browser.

A query in what time frame? Within the last 24 hours, the last week, the last month?

"Recent Queries (showing all queries within the Pi-hole log)" -- when I try to do this. Even downloading the DB and searching manually takes forever. I don't see how adding a clear feature / setting a new timeframe via button would be that clutterly.

I'm trying to determine if the feature would have actually helped anything.

My logs do load way faster now, but trying Long-term data still yells at me that I may need to give more memory to pi-hole.

This is a limitation of PHP.

Close to be a duplicate of