Add some db indices to get rid of slow queries.
Merge branch 'futurecolors-optimization'