-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9261 from aaannz/errata_optimizations
Retracted errata query optimizations
- Loading branch information
Showing
5 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
java/spacewalk-java.changes.oholecek.replace-errata-view-by-select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- use custom select instead of errata view for better performance | ||
(bsc#1225619) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
schema/spacewalk/susemanager-schema.changes.oholecek.errata-optimizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- remove superfluous joins from errata view |
9 changes: 9 additions & 0 deletions
9
...ade/susemanager-schema-5.1.0-to-susemanager-schema-5.1.1/002-errata-view-optimization.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE OR REPLACE VIEW suseServerChannelsRetractedPackagesView AS | ||
SELECT DISTINCT ep.package_id AS pid, | ||
sc.server_id AS sid | ||
FROM rhnserverchannel sc | ||
JOIN rhnchannel c ON c.id = sc.channel_id | ||
JOIN rhnchannelerrata ce ON ce.channel_id = c.id | ||
JOIN rhnerrata e ON e.id = ce.errata_id | ||
JOIN rhnerratapackage ep ON ep.errata_id = e.id | ||
WHERE e.advisory_status::text = 'retracted'::text; |