@diosmosis opened this Issue on December 9th 2020 Member

In Model::getArchiveIdAndVisits() we look for an archive ID and some related metrics in the archive. The query used can potentially scan thousands or more rows just to look for a couple bits of data, due mostly to us not being able to add name to the index.

A possible solution would be to use an approach similar to the log_action table and add a hash column that hashes together the idsite, period, date1, date2, name columns, index it and just query that column. We could potentially also just hash the done flag and add it to the existing index.

Powered by GitHub Issue Mirror