Actions
Bug #23663
closedReports expiry task does a full table scan
Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Running foreman-rake reports:expire days=1
does a full table scan:
mysql> explain DELETE FROM `reports` WHERE `reports`.`type` IN ('ConfigReport') AND (reports.created_at < '2018-05-17 10:25:58'); +----+-------------+---------+------------+------+---------------------------------------------------------+------+---------+------+--------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+---------+------------+------+---------------------------------------------------------+------+---------+------+--------+----------+-------------+ | 1 | DELETE | reports | NULL | ALL | index_reports_on_type,index_reports_on_type_and_host_id | NULL | NULL | NULL | 573019 | 100.00 | Using where | +----+-------------+---------+------------+------+---------------------------------------------------------+------+---------+------+--------+----------+-------------+
Updated by Tomer Brisker about 5 years ago
- Status changed from New to Rejected
Support for MySQL is being dropped in Foreman 2.0. Please migrate to PostgreSQL - see https://theforeman.org/2019/09/dropping-support-for-mysql.html for more details.
Actions