Description of problem: Customers with virtual guest are causing high load on the database. *bugzilla created for historical purpose, issue already addressed* Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Populate a candlepin instance wiht a large number of consumers/consumer facts (9 million rows in our environment for facts) 2. Create a consumer with guest 3. Update consumer with new guest Actual results: Updating consumere may time out or take an extremely long time. Taking several minutes in our prod environment. Expected results: Updating consumers with virtual guest on candlepin instances with large number of consumer facts has similar performance to customers without guests. Additional info:
commit 15589772c0e1265606991cd26c4abfbc467dd71b Author: Bryan Kearney <bkearney> Date: Mon Feb 18 14:11:04 2013 -0500 Improve the performance is checking for guests for a given host. This patch removes a sub-select from the query in lieu of using joins. Joins tend to be much more performant. This does hardcode the table During the research, it was pointed out that this query should facter in the owner to handle the cases where two owners have guests witht h