theforeman/foreman — pull request #150 by gustavosoares (2012-09-05 13:47:43+00:00)
Title: fixes #1837 add some indexes to improve performance

Today The foreman in my company manages 3500 puppetclasses along with 5 environments.

Doing, a simple search in the puppetclasses controller without indexes by name takes too long! more than 30 seg, as follows:

Completed in 33232ms (View: 68, DB: 33151) | 200 OK [http://puppet.globoi.com/puppetclasses?search=cocoon]

with indexes:

Completed in 92ms (View: 69, DB: 12) | 200 OK [http://puppet.globoi.com/puppetclasses?search=cocoon