[Spacewalk-devel] Re: Changed package architecture retrieval to not be a join
Fedora Hosted Git Repositories - spacewalk.git/rss log, Jason Dobies wrote: % Changed package architecture retrieval to not be a join % % • [DH] java/code/src/com/redhat/rhn/common/db/datasource/xml/ % Package_queries.xml % % URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h= % 41585dce3e9b5ee5e2692f9eb73d221750456d9c % Hi Jason, just curious - what was the reason for this change? Both versions are sematicaly equivalent and use same execution plan :). -- Michael Mráka Satellite Engineering, Red Hat --- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml +++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml @@ -1075,11 +1075,12 @@ SELECT pn.name AS NAME, AND p.evr_id = pe.id GROUP BY p.name_id ) full_list, + rhnPackageArch pa, rhnPackageName pn INNER JOIN rhnPackage PKG ON pkg.name_id = pn.id - INNER JOIN rhnPackageArch PA ON pa.id = pkg.package_arch_id WHERE full_list.name_id = pn.id AND full_list.name_id NOT IN (SELECT SP.name_id FROM rhnServerPackage SP WHERE SP.server_id = :sid) + AND pa.id = pkg.package_arch_id ORDER BY UPPER(pn.name) /query /mode ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Re: 475324 - Ported SSM upgrade to Java and added support for multiarch.
Fedora Hosted Git Repositories - spacewalk.git/rss log, Jason Dobies wrote: % 475324 - Ported SSM upgrade to Java and added support for multiarch. % % • [DH] java/code/src/com/redhat/rhn/common/db/datasource/xml/ % System_queries.xml ... % URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h= % cdd16819a0f5066474225ac7316973cf72d0bfb4 ... - AND P.id IN ( - SELECT element -FROM rhnSet - WHERE user_id = :user_id - AND label = 'package_upgradable_list' -) + AND P.name_id IN ( + SELECT element + FROM rhnSet +WHERE user_id = :user_id + AND label = :package_set_label +) + AND P.evr_id IN ( + SELECT element_two + FROM rhnSet +WHERE user_id = :user_id + AND label = :package_set_label +) + AND P.package_arch_id IN ( + SELECT element_three + FROM rhnSet +WHERE user_id = :user_id + AND label = :package_set_label +) ... Hi Jason, please modify queries to use AND (P.name_id, P.evr_id, P.package_arch_id) IN ( SELECT element, element_two, element_three FROM rhnSet ... ) i.e. single IN condition for all three values. Simply - it's much faster :). -- Michael Mráka Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] Re: Changed package architecture retrieval to not be a join
On Tue, Dec 09, 2008 at 10:39:54AM +0100, Michael Mraka wrote: Fedora Hosted Git Repositories - spacewalk.git/rss log, Jason Dobies wrote: % Changed package architecture retrieval to not be a join % % • [DH] java/code/src/com/redhat/rhn/common/db/datasource/xml/ % Package_queries.xml % % URL: http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h= % 41585dce3e9b5ee5e2692f9eb73d221750456d9c % Hi Jason, just curious - what was the reason for this change? Both versions are sematicaly equivalent and use same execution plan :). Doesn't some following commit get rid of that remaining INNER JOIN as well? In that case if would be a welcome cleanup. --- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml +++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml @@ -1075,11 +1075,12 @@ SELECT pn.name AS NAME, AND p.evr_id = pe.id GROUP BY p.name_id ) full_list, + rhnPackageArch pa, rhnPackageName pn INNER JOIN rhnPackage PKG ON pkg.name_id = pn.id - INNER JOIN rhnPackageArch PA ON pa.id = pkg.package_arch_id WHERE full_list.name_id = pn.id AND full_list.name_id NOT IN (SELECT SP.name_id FROM rhnServerPackage SP WHERE SP.server_id = :sid) + AND pa.id = pkg.package_arch_id ORDER BY UPPER(pn.name) /query /mode ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Jan Pazdziora Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Re: Changed package architecture retrieval to not be a join
Hi Jason, just curious - what was the reason for this change? Both versions are sematicaly equivalent and use same execution plan :). I think I was just being OCD and wanting all of my multiarch changes to the queries to look the same. :) -- Jason Dobies ([EMAIL PROTECTED]) Senior Software Engineer RHN Satellite Spacewalk Freenode: jdob @ #spacewalk, #spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] RFC 2919 header test (ignore)
___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Patches: rhncfg-*
Hi all Attached are two patches. The first fixes an issue where the sticky, suid and/or guid bits are ignored when uploading files using rhncfg-manager. The second provides an 'ls' like output of managed files. Called by 'rhncfg-client elist'. (I'm submitting this on behalf of a colleague, Ian Chapman.) Thanks CC NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments. 0001-Allow-preservation-of-setuid-setgid-and-sticky-bits.patch Description: 0001-Allow-preservation-of-setuid-setgid-and-sticky-bits.patch 0002-Added-an-extended-list-feature-elist-to-the-rhncfg.patch Description: 0002-Added-an-extended-list-feature-elist-to-the-rhncfg.patch ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel