Add indexes for (updated_at, status) to BulkImports / BulkImports::Entity tables
When working on !137199 (merged) it was discovered BulkImport
and BulkImports::Entity
tables don't have the necessary indexes to support large scale filters.
Proposal
We should add an index on updated_at, status
for both these tables.
This is because they use the scope :stale, -> { where('created_at < ?', 24.hours.ago).where(status: [0, 1]) }
Edited by Max Fan