In two places we were doing a join that, for lack of indexes, was hugely slow.

In one place, the query can be replaced by a call to transation_node_get_translations().

The other - in a Views filter - requires adding two indexes:

CREATE INDEX node_tnid_language ON node(tnid,language);
CREATE INDEX node_language ON node(language); 
CommentFileSizeAuthor
#3 country_code-index.patch1.83 KBnedjo

Comments

nedjo’s picture

Applied a patch to refine the first case.

TODO: add the indexes. Presumably we do so with hook_schema_alter(). But will these changes be made on install?

nedjo’s picture

Assigned: Unassigned » nedjo

Working up a patch.

nedjo’s picture

Status: Active » Needs review
StatusFileSize
new1.83 KB

Patch attached.

I'd like to consider #329608: Move country language filter to its own module before applying this.

catch’s picture

Status: Needs review » Postponed

Marking this postponed against #329628: commentactivity.module Bug w/ Fix.