- Issue created by @sakonn
- Status changed to Postponed: needs info
over 2 years ago 9:48pm 27 March 2023 - Status changed to Active
3 months ago 6:49am 20 May 2025 - π¨π³China lawxen
I got the same problem, Detail:
SELECT node_field_data.langcode AS node_field_data_langcode, taxonomy_term_field_data_node__department.langcode AS taxonomy_term_field_data_node__department_langcode, node_field_data.published_at AS node_field_data_published_at, node_field_data.nid AS nid, taxonomy_term_field_data_node__department.tid AS taxonomy_term_field_data_node__department_tid FROM {node_field_data} node_field_data LEFT JOIN {node__department} node__department ON node_field_data.nid = node__department.entity_id AND node__department.deleted = '0' AND (node__department.langcode = node_field_data.langcode OR node__department.bundle = 'article') LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__department ON node__department.department_target_id = taxonomy_term_field_data_node__department.tid INNER JOIN {node__category} node__category ON node_field_data.nid = node__category.entity_id AND node__category.deleted = '0' AND (node__category.langcode = node_field_data.langcode OR node__category.bundle = 'article') WHERE (((node__category.category_target_id IN('10', '34333', '24', '23', '26', '19', '18', '27', '16', '13', '17', '14', '25', '48', '15', '20'))) AND (node_field_data.nid IN (SELECT tn.nid AS nid FROM {taxonomy_index} tn LEFT OUTER JOIN {taxonomy_term__parent} th ON th.entity_id = tn.tid LEFT OUTER JOIN {taxonomy_term__parent} th1 ON th.parent_target_id = th1.entity_id LEFT OUTER JOIN {taxonomy_term__parent} th2 ON th1.parent_target_id = th2.entity_id WHERE (tn.tid = '1263') OR (th1.entity_id = '1263') OR (th2.entity_id = '1263'))) AND (node_field_data.trash = '0')) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('article')) AND (node_field_data.promote = '1')) ORDER BY node_field_data_published_at DESC LIMIT 9 OFFSET 0
After Delete the contextual filter, the speed faster several times.
SELECT node_field_data.langcode AS node_field_data_langcode, taxonomy_term_field_data_node__department.langcode AS taxonomy_term_field_data_node__department_langcode, node_field_data.published_at AS node_field_data_published_at, node_field_data.nid AS nid, taxonomy_term_field_data_node__department.tid AS taxonomy_term_field_data_node__department_tid FROM {node_field_data} node_field_data LEFT JOIN {node__department} node__department ON node_field_data.nid = node__department.entity_id AND node__department.deleted = '0' AND (node__department.langcode = node_field_data.langcode OR node__department.bundle = 'article') LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__department ON node__department.department_target_id = taxonomy_term_field_data_node__department.tid INNER JOIN {node__category} node__category ON node_field_data.nid = node__category.entity_id AND node__category.deleted = '0' AND (node__category.langcode = node_field_data.langcode OR node__category.bundle = 'article') WHERE (((node__category.category_target_id IN('10', '34333', '24', '23', '26', '19', '18', '27', '16', '13', '17', '14', '25', '48', '15', '20'))) AND ((node__department.department_target_id IN('1263', '70', '25981', '76', '116', '117', '62', '105', '72', '103', '78', '91', '99', '31431', '35625', '22973', '106', '75', '97', '126', '82', '83', '22968', '118', '80', '115', '22967', '69', '85', '108', '67', '95', '25606', '122', '92', '84', '114', '100', '65', '22972', '22257', '74', '66', '73', '119', '109', '124', '96', '64', '71', '107', '68', '104', '63', '90', '88'))) AND (node_field_data.trash = '0')) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('article')) AND (node_field_data.promote = '1')) ORDER BY node_field_data_published_at DESC LIMIT 9 OFFSET 0