Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295276

_locale_rebuild_js has bad database search performance

$
0
0

Apologize for my poor English.
While I debugging slow queries on my Drupal 7.12 site, I found a query in locale module is very slow.
I think the reason is that some modules will filter/sort {locales_target} table by `language` field, however it's not indexed.
Please see this function for example:
http://api.drupal.org/api/drupal/includes%21locale.inc/function/_locale_...

$result = db_query("SELECT s.lid, s.source, s.context, t.translation FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.location LIKE '%.js%' AND s.textgroup = :textgroup", array(':language' => $language->language, ':textgroup' => 'default'));

Viewing all articles
Browse latest Browse all 295276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>