svenfuchs/globalize3 — Issue #72: Add locale index to translation tables
Author: dadittoz
Created: 2011-10-09 01:43:01+00:00
State: open

Looks like translation tables miss index on "locale" field. This causes a big slow-down on large translation tables (have over 1 second query on DB with 30k records) in Globalize::ActiveRecord::Translation.translated_locales function call (SELECT DISTINCT locale). MySQL EXPLAIN command says "Using temporary" on this query, what is definitely bad. Adding index to "locale" fixes this issue. This should be added to migration.rb.