Skip to content

Add user index on spam logs

Andreas Brandl requested to merge ab/spam-logs-index into master

What does this MR do?

This is mostly a guess at what's causing the seq scans in #327482 (closed). However, the index on user_id is required anyways, given that there is a belongs_to relationship in the model (though no foreign key).

My suspicion is that seq scans are caused by users being deleted, which in turn deletes logs for the given user. Without an index this leads to a seq scan.

Does this MR meet the acceptance criteria?

Conformity

Edited by Andreas Brandl

Merge request reports

Loading