Version: 4.1.1 Reporter: Andrew Gunstone —
I suspect that this affect all EE4 versions … but I’ve found when adding a larger number of fields the channel entries queries run progressively slower. I currently have round 20 fairly basic fields for an “event” channel. I only have round 5 entries in the channel so far. I’m then using Low Search, but finding it incredibly slow (around 20+ seconds).
Using the debug info built into EE (yay!), I found the query was being called via Low Search:
$tagdata = $channel->entries();
This then led me to mod.channel.php … where I have changed some of the code (very bad to modify core I know!!) …
Line 2534 and line 2862 … change them both from:
$from .= "LEFT JOIN {$table} ON t.entry_id = {$table}.entry_id ";
to:
$from .= "LEFT JOIN {$table} FORCE INDEX(entry_id) ON t.entry_id = {$table}.entry_id ";
The query is now super fast. I’m not sure if it’s only because I have a low number of entries in the channel that MySQL (5.6.38) is not optimising the indexes automatically … but this change has made a dramatic difference.
Hope fully this (or a better solution if you know one!) can be rolled into core.
Cheers!
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```