[development] Two performance improvements
dries.buytaert at gmail.com
Wed Jul 12 16:22:52 UTC 2006
On 11 Jul 2006, at 22:06, Jakub Suchy wrote:
> I found this query is not using index:
> SELECT locale, name FROM locales_meta WHERE enabled = 1 ORDER BY
> isdefault DESC, name ASC;
> This may be fixed using:
> ALTER TABLE locales_meta ADD INDEX(enabled);
> But i am not experienced in developing Drupal core yet, so could
> somebody adopt this issue and add it to CVS please?
You're right. It is not using an index.
> This query is executed more than 11 times every time:
> SELECT s.lid, t.translation FROM locales_source s INNER JOIN
> locales_target t ON s.lid = t.lid WHERE s.source = '' AND t.locale
> = 'cs'
> I don't understand where may appear empty locale string and can't
> imagine how to debug this, can anybody help?
This query isn't using an index either.
Maybe post a comment to the locale issue I mentioned in the original
e-mail. Report your additional findings and then hopefully, someone
will add indices for these queries in one smooth swoop. :-)
Dries Buytaert :: http://www.buytaert.net/
More information about the development