Parsons, Aron wrote: % You are right and I realized that this morning when thinking about % directories and symlinks. % % Your suggestion to do a nested query does make a difference and it looks like it gives the results we're looking for. % % --- slow.sql 2011-11-22 10:04:25.951471422 -0500 % +++ query.sql 2011-11-22 10:47:21.481745356 -0500 % @@ -22,8 +22,12 @@ % rhnConfigRevision cr % left join rhnConfigContent ccont % on cr.config_content_id = ccont.id % -left join rhnChecksumView c % -on ccont.checksum_id = c.id, % +left join % + (select cs.id, cs.checksum_type, cs.checksum % + from rhnChecksumView cs % + inner join rhnConfigContent ccont % + on ccont.checksum_id = cs.id) c % +on c.id = ccont.checksum_id, % rhnServerConfigChannel scc, % rhnConfigFile cf, % rhnConfigFileType cft,
Hi Aron, there's one bad thing about your fix - this new select joins rhnConfigContent table twice, which means it scans the table twice and even may result in some unexpected cartesian products. I've fixed it in spacewalk master by 79e57d3b215340a54e911a073408f0eb7c6afc1f. Regards, -- Michael Mráka Satellite Engineering, Red Hat _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
