Search Hosts by owner = current_user is very inefficient
When a user is a member of four groups and the groups each have a role that allows view_hosts access with a "owner = current_user" search condition, page loading is very slow.
For every group the user leaves, the requests get faster.
This gist contains a request log from api/hosts/redacted.example.com.
The (very simple) request took 30 seconds to be generated.