Add hotfixes from running code.
Custom SQL query to replace slow generated query