mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Add missing join condition (#2586)
This commit is contained in:
parent
c3f7577bd8
commit
86b1926d7c
2 changed files with 2 additions and 1 deletions
1
changes/add-join-condition
Normal file
1
changes/add-join-condition
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Improve performance of software listing query.
|
||||
|
|
@ -236,7 +236,7 @@ func listSoftwareDB(ctx context.Context, q sqlx.QueryerContext, hostID *uint, te
|
|||
SELECT DISTINCT s.id, scv.cve
|
||||
FROM host_software hs
|
||||
JOIN hosts h ON (hs.host_id=h.id)
|
||||
JOIN software s
|
||||
JOIN software s ON (s.id=hs.software_id)
|
||||
JOIN software_cpe scp ON (s.id=scp.software_id)
|
||||
JOIN software_cve scv ON (scp.id=scv.cpe_id)
|
||||
WHERE %s AND %s
|
||||
|
|
|
|||
Loading…
Reference in a new issue