Fix `Security::Finding.build` doing cross-join via `ci_builds`
Problem
I started trying to fix this in !71714 (closed) but realised it was more tricky than I thought.
The Security::Finding#build
is doing:
select * from ci_builds
inner join security_scans ...
...
Which will not be possible when ci_*
tables have been moved to a separate database.
Possible solutions
- Use
disable_joins
. How will this perform for preloads?