Bug #23683 Clarification Requested

Slow With Greater than 1M Records

Version: 4.3.3 Reporter: dougblackjr

The current site we are building (an EE2 upgrade to EE4) has a channel with 1.4 million records in it. We are running into multiple issues with creation of a new channel entry via the ChannelEntry model, clicking the channel link in the Edit menu on the control panel, or searching via title or other fields in the control panel.

1) CHANNELENTRY MODEL: In attempting to use the native EE models to create a new entry, we found this code:

$entry = ee('Model')->make('ChannelEntry');
     $entry->Channel            = $channel;
     $entry->status = 'open';
     $entry->set($channel_titles);
     $entry->save();

was taking approximately 1 - 3 minutes to run. We examined the queries occurring during this run and found a SELECT COUNT that was run a few times that would take between 25-35 seconds, even on indexed columns.

2) CHANNEL LINK IN EDIT MENU: Clicking on the name of the channel in the standard takes approximately 1.25 - 2 minutes to show the page. The same time amount takes place when trying to access the next or previous page in pagination. Queries that took a long time: SELECT DISTINCT and SELECT COUNT. It only works this way for the large channel; all other channels operate as expected.

3) SEARCH: When doing a search in the channel via the control panel, we see the same time lapse (1.25 - 2 minutes) per search. This occurs when we search using the specific channel and one word, looking only at the title field. Queries that took a long time: SELECT DISTINCT and SELECT COUNT. It only works this way for the large channel; all other channels operate as expected.

We have tried this with very high levels of memory and removing all time limits, have added indexes to the pertinent fields, and have optimized the MySQL set up. We have turned off all extensions and have faced the same issue. There are no error messages in local development, and we increased time limits to bypass 504 errors.

Stack: EE 4.3.3 PHP 7.1 (memory limit and timeout are set extremely high) MariaDB 10.1.31 on a db.m4.large sized RDS instance in AWS with 100GB allocated, 2cpu/8gb

Appreciate any feedback you can offer.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases