From 7c59f2b66284b5b561c5368a0c834640ae0e611e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 23 Apr 2026 10:11:13 +0100 Subject: Add BRIN index to access_log.request_time and improve purge Purge is now fully request_time based and not hacked around id ranges. --- src/ingestor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ingestor.cpp') diff --git a/src/ingestor.cpp b/src/ingestor.cpp index cc5270f..c41454f 100644 --- a/src/ingestor.cpp +++ b/src/ingestor.cpp @@ -439,8 +439,8 @@ namespace WebStat { auto dbconn = dbpool->get(); const auto stopAt = Job::LastRunTime::clock::now() + settings.purgeDeleteMaxTime; const auto purge = dbconn->modify(SQL::ACCESS_LOG_PURGE_OLD, SQL::ACCESS_LOG_PURGE_OLD_OPTS); - purge->bindParam(0, settings.purgeDeleteMax); - purge->bindParam(1, std::format("{} days", settings.purgeDaysToKeep)); + purge->bindParam(0, std::format("{} days", settings.purgeDaysToKeep)); + purge->bindParam(1, settings.purgeDeleteMax); unsigned int purgedTotal {}; while (stopAt > Job::LastRunTime::clock::now()) { const auto purged = purge->execute(); -- cgit v1.3