*************************** 1. row *************************** QUERY: SELECT CASE WHEN p.id IS NULL THEN tr.object_id ELSE p.id END AS product_id, tr.object_id AS parent_product_id, tr.object_id AS effective_product_id, t.term_id as brand_id, t.name AS brand, t.slug as brand_slug, '0' as product_stock, '0' as product_count, MAX(ts.name) as size, MAX(tc.name) as color FROM wp_posts p JOIN wp_term_relationships tr ON (p.id = tr.object_id OR p.post_parent = tr.object_id) AND p.post_type LIKE '%product%' AND p.post_status = 'publish' JOIN wp_term_taxonomy xt ON xt.term_taxonomy_id = tr.term_taxonomy_id AND xt.taxonomy = 'pa_brand_master' JOIN wp_terms t ON t.term_id = xt.term_id LEFT JOIN (SELECT trs.object_id, ts.name FROM wp_term_relationships trs JOIN wp_term_taxonomy xs ON xs.term_taxonomy_id = trs.term_taxonomy_id JOIN wp_terms ts ON ts.term_id = xs.term_id WHERE xs.taxonomy IN ('pa_size', 'pa_megethos', 'pa_noumero')) AS ts ON p.id = ts.object_id LEFT JOIN (SELECT trc.object_id, tc.name FROM wp_term_relationships trc JOIN wp_term_taxonomy xc ON xc.term_taxonomy_id = trc.term_taxonomy_id JOIN wp_terms tc ON tc.term_id = xc.term_id WHERE xc.taxonomy IN ('pa_color', 'pa_chroma', 'pa_colour')) AS tc ON p.id = tc.object_id GROUP BY p.id, tr.object_id, t.term_id, t.name, t.slug ORDER BY p.id, t.slug DESC TRACE: { "steps": [ { "join_preparation": { "select_id": 1, "steps": [ { "derived": { "table": "ts", "select_id": 2, "algorithm": "merged" } }, { "join_preparation": { "select_id": 2, "steps": [ { "expanded_query": "/* select#2 */ select trs.object_id AS object_id,ts.`name` AS `name` from ((wp_term_relationships trs join wp_term_taxonomy xs on(xs.term_taxonomy_id = trs.term_taxonomy_id)) join wp_terms ts on(ts.term_id = xs.term_id)) where xs.taxonomy in ('pa_size','pa_megethos','pa_noumero')" } ] } }, { "derived": { "table": "tc", "select_id": 3, "algorithm": "merged" } }, { "join_preparation": { "select_id": 3, "steps": [ { "expanded_query": "/* select#3 */ select trc.object_id AS object_id,tc.`name` AS `name` from ((wp_term_relationships trc join wp_term_taxonomy xc on(xc.term_taxonomy_id = trc.term_taxonomy_id)) join wp_terms tc on(tc.term_id = xc.term_id)) where xc.taxonomy in ('pa_color','pa_chroma','pa_colour')" } ] } }, { "expanded_query": "/* select#1 */ select case when p.`ID` is null then tr.object_id else p.`ID` end AS product_id,tr.object_id AS parent_product_id,tr.object_id AS effective_product_id,t.term_id AS brand_id,t.`name` AS brand,t.slug AS brand_slug,'0' AS product_stock,'0' AS product_count,max(ts.`name`) AS size,max(tc.`name`) AS color from (((((wp_posts p join wp_term_relationships tr on((p.`ID` = tr.object_id or p.post_parent = tr.object_id) and p.post_type like '%product%' and p.post_status = 'publish')) join wp_term_taxonomy xt on(xt.term_taxonomy_id = tr.term_taxonomy_id and xt.taxonomy = 'pa_brand_master')) join wp_terms t on(t.term_id = xt.term_id)) left join (/* select#2 */ select trs.object_id AS object_id,ts.`name` AS `name` from ((wp_term_relationships trs join wp_term_taxonomy xs on(xs.term_taxonomy_id = trs.term_taxonomy_id)) join wp_terms ts on(ts.term_id = xs.term_id)) where xs.taxonomy in ('pa_size','pa_megethos','pa_noumero')) ts on(p.`ID` = ts.object_id)) left join (/* select#3 */ select trc.object_id AS object_id,tc.`name` AS `name` from ((wp_term_relationships trc join wp_term_taxonomy xc on(xc.term_taxonomy_id = trc.term_taxonomy_id)) join wp_terms tc on(tc.term_id = xc.term_id)) where xc.taxonomy in ('pa_color','pa_chroma','pa_colour')) tc on(p.`ID` = tc.object_id)) group by p.`ID`,tr.object_id,t.term_id,t.`name`,t.slug order by p.`ID`,t.slug desc" } ] } }, { "join_optimization": { "select_id": 1, "steps": [ { "condition_processing": { "condition": "WHERE", "original_condition": "t.term_id = xt.term_id and xt.term_taxonomy_id = tr.term_taxonomy_id and xt.taxonomy = 'pa_brand_master' and (p.`ID` = tr.object_id or p.post_parent = tr.object_id) and p.post_type like '%product%' and p.post_status = 'publish'", "steps": [ { "build_equal_items": { "condition": "ON expr", "attached_to": "tc", "resulting_condition": "xc.taxonomy in ('pa_color','pa_chroma','pa_colour') and multiple equal(p.`ID`, trc.object_id) and multiple equal(tc.term_id, xc.term_id) and multiple equal(xc.term_taxonomy_id, trc.term_taxonomy_id)" } }, { "build_equal_items": { "condition": "ON expr", "attached_to": "ts", "resulting_condition": "xs.taxonomy in ('pa_size','pa_megethos','pa_noumero') and multiple equal(p.`ID`, trs.object_id) and multiple equal(ts.term_id, xs.term_id) and multiple equal(xs.term_taxonomy_id, trs.term_taxonomy_id)" } }, { "transformation": "equality_propagation", "resulting_condition": "xt.taxonomy = 'pa_brand_master' and (multiple equal(p.`ID`, tr.object_id) or multiple equal(p.post_parent, tr.object_id)) and p.post_type like '%product%' and p.post_status = 'publish' and multiple equal(t.term_id, xt.term_id) and multiple equal(xt.term_taxonomy_id, tr.term_taxonomy_id)" }, { "transformation": "constant_propagation", "resulting_condition": "xt.taxonomy = 'pa_brand_master' and (multiple equal(p.`ID`, tr.object_id) or multiple equal(p.post_parent, tr.object_id)) and p.post_type like '%product%' and p.post_status = 'publish' and multiple equal(t.term_id, xt.term_id) and multiple equal(xt.term_taxonomy_id, tr.term_taxonomy_id)" }, { "transformation": "trivial_condition_removal", "resulting_condition": "xt.taxonomy = 'pa_brand_master' and (multiple equal(p.`ID`, tr.object_id) or multiple equal(p.post_parent, tr.object_id)) and p.post_type like '%product%' and p.post_status = 'publish' and multiple equal(t.term_id, xt.term_id) and multiple equal(xt.term_taxonomy_id, tr.term_taxonomy_id)" } ] } }, { "table_dependencies": [ { "table": "p", "row_may_be_null": false, "map_bit": 0, "depends_on_map_bits": [] }, { "table": "tr", "row_may_be_null": false, "map_bit": 1, "depends_on_map_bits": [] }, { "table": "xt", "row_may_be_null": false, "map_bit": 2, "depends_on_map_bits": [] }, { "table": "t", "row_may_be_null": false, "map_bit": 3, "depends_on_map_bits": [] }, { "table": "trs", "row_may_be_null": true, "map_bit": 4, "depends_on_map_bits": ["0"] }, { "table": "xs", "row_may_be_null": true, "map_bit": 6, "depends_on_map_bits": ["0"] }, { "table": "ts", "row_may_be_null": true, "map_bit": 7, "depends_on_map_bits": ["0"] }, { "table": "trc", "row_may_be_null": true, "map_bit": 5, "depends_on_map_bits": ["0", "4", "6", "7"] }, { "table": "xc", "row_may_be_null": true, "map_bit": 8, "depends_on_map_bits": ["0", "4", "6", "7"] }, { "table": "tc", "row_may_be_null": true, "map_bit": 9, "depends_on_map_bits": ["0", "4", "6", "7"] } ] }, { "ref_optimizer_key_uses": [ { "table": "tr", "index": "term_taxonomy_id", "field": "term_taxonomy_id", "equals": "xt.term_taxonomy_id", "null_rejecting": false }, { "table": "xt", "index": "PRIMARY", "field": "term_taxonomy_id", "equals": "tr.term_taxonomy_id", "null_rejecting": false }, { "table": "xt", "index": "term_id_taxonomy", "field": "term_id", "equals": "t.term_id", "null_rejecting": false }, { "table": "xt", "index": "term_id_taxonomy", "field": "taxonomy", "equals": "'pa_brand_master'", "null_rejecting": false }, { "table": "xt", "index": "taxonomy", "field": "taxonomy", "equals": "'pa_brand_master'", "null_rejecting": false }, { "table": "xt", "index": "taxonomy", "field": "term_taxonomy_id", "equals": "tr.term_taxonomy_id", "null_rejecting": false }, { "table": "t", "index": "PRIMARY", "field": "term_id", "equals": "xt.term_id", "null_rejecting": false }, { "table": "trs", "index": "PRIMARY", "field": "object_id", "equals": "p.`ID`", "null_rejecting": false }, { "table": "trs", "index": "PRIMARY", "field": "term_taxonomy_id", "equals": "xs.term_taxonomy_id", "null_rejecting": true }, { "table": "trs", "index": "term_taxonomy_id", "field": "term_taxonomy_id", "equals": "xs.term_taxonomy_id", "null_rejecting": true }, { "table": "trs", "index": "term_taxonomy_id", "field": "object_id", "equals": "p.`ID`", "null_rejecting": false }, { "table": "trc", "index": "PRIMARY", "field": "object_id", "equals": "p.`ID`", "null_rejecting": false }, { "table": "trc", "index": "PRIMARY", "field": "term_taxonomy_id", "equals": "xc.term_taxonomy_id", "null_rejecting": true }, { "table": "trc", "index": "term_taxonomy_id", "field": "term_taxonomy_id", "equals": "xc.term_taxonomy_id", "null_rejecting": true }, { "table": "trc", "index": "term_taxonomy_id", "field": "object_id", "equals": "p.`ID`", "null_rejecting": false }, { "table": "xs", "index": "PRIMARY", "field": "term_taxonomy_id", "equals": "trs.term_taxonomy_id", "null_rejecting": true }, { "table": "xs", "index": "term_id_taxonomy", "field": "term_id", "equals": "ts.term_id", "null_rejecting": true }, { "table": "ts", "index": "PRIMARY", "field": "term_id", "equals": "xs.term_id", "null_rejecting": true }, { "table": "xc", "index": "PRIMARY", "field": "term_taxonomy_id", "equals": "trc.term_taxonomy_id", "null_rejecting": true }, { "table": "xc", "index": "term_id_taxonomy", "field": "term_id", "equals": "tc.term_id", "null_rejecting": true }, { "table": "tc", "index": "PRIMARY", "field": "term_id", "equals": "xc.term_id", "null_rejecting": true } ] }, { "eliminated_tables": [] }, { "rows_estimation": [ { "selectivity_for_indexes": [], "selectivity_for_columns": [], "cond_selectivity": 1 }, { "table": "p", "table_scan": { "rows": 66905, "read_cost": 8.517349845, "read_and_compare_cost": 10.65830984 } }, { "table": "tr", "table_scan": { "rows": 92590, "read_cost": 10.77919407, "read_and_compare_cost": 13.74207407 } }, { "table": "xt", "range_analysis": { "table_scan": { "rows": 7171, "cost": 1.2617886 }, "potential_range_indexes": [ { "index": "PRIMARY", "usable": false, "cause": "not applicable" }, { "index": "term_id_taxonomy", "usable": false, "cause": "not applicable" }, { "index": "taxonomy", "usable": true, "key_parts": ["taxonomy", "term_taxonomy_id"] } ], "best_covering_index_scan": { "index": "term_id_taxonomy", "cost": 1.131182055, "chosen": true }, "setup_range_conditions": [], "analyzing_range_alternatives": { "range_scan_alternatives": [ { "index": "taxonomy", "ranges": [ "(pa_brand_master) <= (taxonomy) <= (pa_brand_master)" ], "rowid_ordered": true, "using_mrr": false, "index_only": false, "rows": 254, "cost": 0.3342332, "chosen": true } ], "analyzing_roworder_intersect": { "cause": "too few roworder scans" }, "analyzing_index_merge_union": [] }, "group_index_range": { "chosen": false, "cause": "not single_table" }, "chosen_range_access_summary": { "range_access_plan": { "type": "range_scan", "index": "taxonomy", "rows": 254, "ranges": [ "(pa_brand_master) <= (taxonomy) <= (pa_brand_master)" ] }, "rows_for_plan": 254, "cost_for_plan": 0.3342332, "chosen": true } } }, { "table": "xt", "rowid_filters": [ { "key": "taxonomy", "build_cost": 0.036833043, "rows": 254 } ] }, { "selectivity_for_indexes": [ { "index_name": "taxonomy", "selectivity_from_index": 0.035420443 } ], "selectivity_for_columns": [], "cond_selectivity": 0.035420443 }, { "table": "t", "table_scan": { "rows": 7525, "read_cost": 1.0786906, "read_and_compare_cost": 1.3194906 } }, { "table": "trs", "table_scan": { "rows": 92590, "read_cost": 10.77919407, "read_and_compare_cost": 13.74207407 } }, { "table": "xs", "range_analysis": { "table_scan": { "rows": 7171, "cost": 1.2617886 }, "potential_range_indexes": [ { "index": "PRIMARY", "usable": false, "cause": "not applicable" }, { "index": "term_id_taxonomy", "usable": false, "cause": "not applicable" }, { "index": "taxonomy", "usable": true, "key_parts": ["taxonomy", "term_taxonomy_id"] } ], "best_covering_index_scan": { "index": "term_id_taxonomy", "cost": 1.131182055, "chosen": true }, "setup_range_conditions": [], "analyzing_range_alternatives": { "range_scan_alternatives": [ { "index": "taxonomy", "ranges": [ "(pa_megethos) <= (taxonomy) <= (pa_megethos)", "(pa_noumero) <= (taxonomy) <= (pa_noumero)", "(pa_size) <= (taxonomy) <= (pa_size)" ], "rowid_ordered": false, "using_mrr": false, "index_only": false, "rows": 3, "cost": 0.0111668, "chosen": true } ], "analyzing_roworder_intersect": { "cause": "too few roworder scans" }, "analyzing_index_merge_union": [] }, "group_index_range": { "chosen": false, "cause": "not single_table" }, "chosen_range_access_summary": { "range_access_plan": { "type": "range_scan", "index": "taxonomy", "rows": 3, "ranges": [ "(pa_megethos) <= (taxonomy) <= (pa_megethos)", "(pa_noumero) <= (taxonomy) <= (pa_noumero)", "(pa_size) <= (taxonomy) <= (pa_size)" ] }, "rows_for_plan": 3, "cost_for_plan": 0.0111668, "chosen": true } } }, { "table": "xs", "rowid_filters": [ { "key": "taxonomy", "build_cost": 0.005302389, "rows": 3 } ] }, { "selectivity_for_indexes": [ { "index_name": "taxonomy", "selectivity_from_index": 4.183517e-4 } ], "selectivity_for_columns": [], "cond_selectivity": 4.183517e-4 }, { "table": "ts", "table_scan": { "rows": 7525, "read_cost": 1.0786906, "read_and_compare_cost": 1.3194906 } }, { "table": "trc", "table_scan": { "rows": 92590, "read_cost": 10.77919407, "read_and_compare_cost": 13.74207407 } }, { "table": "xc", "range_analysis": { "table_scan": { "rows": 7171, "cost": 1.2617886 }, "potential_range_indexes": [ { "index": "PRIMARY", "usable": false, "cause": "not applicable" }, { "index": "term_id_taxonomy", "usable": false, "cause": "not applicable" }, { "index": "taxonomy", "usable": true, "key_parts": ["taxonomy", "term_taxonomy_id"] } ], "best_covering_index_scan": { "index": "term_id_taxonomy", "cost": 1.131182055, "chosen": true }, "setup_range_conditions": [], "analyzing_range_alternatives": { "range_scan_alternatives": [ { "index": "taxonomy", "ranges": [ "(pa_chroma) <= (taxonomy) <= (pa_chroma)", "(pa_color) <= (taxonomy) <= (pa_color)", "(pa_colour) <= (taxonomy) <= (pa_colour)" ], "rowid_ordered": false, "using_mrr": false, "index_only": false, "rows": 24, "cost": 0.04923224, "chosen": true } ], "analyzing_roworder_intersect": { "cause": "too few roworder scans" }, "analyzing_index_merge_union": [] }, "group_index_range": { "chosen": false, "cause": "not single_table" }, "chosen_range_access_summary": { "range_access_plan": { "type": "range_scan", "index": "taxonomy", "rows": 24, "ranges": [ "(pa_chroma) <= (taxonomy) <= (pa_chroma)", "(pa_color) <= (taxonomy) <= (pa_color)", "(pa_colour) <= (taxonomy) <= (pa_colour)" ] }, "rows_for_plan": 24, "cost_for_plan": 0.04923224, "chosen": true } } }, { "table": "xc", "rowid_filters": [ { "key": "taxonomy", "build_cost": 0.008045806, "rows": 24 } ] }, { "selectivity_for_indexes": [ { "index_name": "taxonomy", "selectivity_from_index": 0.003346814 } ], "selectivity_for_columns": [], "cond_selectivity": 0.003346814 }, { "table": "tc", "table_scan": { "rows": 7525, "read_cost": 1.0786906, "read_and_compare_cost": 1.3194906 } } ] }, { "considered_execution_plans": [ { "plan_prefix": "", "get_costs_for_tables": [ { "best_access_path": { "table": "xt", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_id_taxonomy", "chosen": false, "cause": "no predicate for first keypart" }, { "access_type": "ref", "index": "taxonomy", "used_range_estimates": true, "rows": 254, "cost": 0.33344208, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 254, "rows_out": 254, "cost": 0.33344208, "uses_join_buffering": false } } }, { "best_access_path": { "table": "t", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 1.3194906, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 1.3194906, "uses_join_buffering": false } } }, { "best_access_path": { "table": "p", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "scan", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 10.65830984, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 10.65830984, "uses_join_buffering": false } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "scan", "rows": 92590, "rows_after_filter": 92590, "rows_out": 92590, "cost": 13.74207407, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 92590, "rows_out": 92590, "cost": 13.74207407, "uses_join_buffering": false } } } ] }, { "plan_prefix": "", "table": "xt", "rows_for_plan": 254, "cost_for_plan": 0.33344208, "rest_of_plan": [ { "plan_prefix": "xt", "get_costs_for_tables": [ { "best_access_path": { "table": "t", "plan_details": { "record_count": 254 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 0.30665016, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 0.30665016, "uses_join_buffering": false } } }, { "best_access_path": { "table": "p", "plan_details": { "record_count": 254 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 1588.826501, "cost_without_join_buffer": 2503.890995, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 1588.826501, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 254 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_taxonomy_id", "rows": 13, "cost": 0.84261595, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 13, "rows_out": 13, "cost": 0.84261595, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt", "table": "t", "rows_for_plan": 254, "cost_for_plan": 0.64009224, "rest_of_plan": [ { "plan_prefix": "xt,t", "get_costs_for_tables": [ { "best_access_path": { "table": "p", "plan_details": { "record_count": 254 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 2623.175393, "cost_without_join_buffer": 2503.890995, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 2623.175393, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 254 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_taxonomy_id", "rows": 13, "cost": 0.84261595, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 13, "rows_out": 13, "cost": 0.84261595, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt,t", "table": "tr", "rows_for_plan": 3302, "cost_for_plan": 1.48270819, "rest_of_plan": [ { "plan_prefix": "xt,t,tr", "get_costs_for_tables": [ { "best_access_path": { "table": "p", "plan_details": { "record_count": 3302 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 47459.33467, "cost_without_join_buffer": 32540.93931, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 47459.33467, "uses_join_buffering": true } } } ] }, { "plan_prefix": "xt,t,tr", "table": "p", "rows_for_plan": 220920310, "cost_for_plan": 47460.81738, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p", "get_costs_for_tables": [ { "best_access_path": { "table": "ts", "plan_details": { "record_count": 220920310 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 273947414.4, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 273947414.4, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xs", "plan_details": { "record_count": 220920310 }, "considered_access_paths": [ { "access_type": "range", "range_index": "taxonomy", "rows": 3, "rows_after_filter": 3, "rows_out": 3, "cost": 1381105.415, "chosen": true } ], "chosen_access_method": { "type": "range", "rows_read": 3, "rows_out": 3, "cost": 1381105.415, "uses_join_buffering": true } } }, { "best_access_path": { "table": "trs", "plan_details": { "record_count": 220920310 }, "considered_access_paths": [ { "access_type": "ref", "index": "PRIMARY", "rows": 3, "cost": 285113.3612, "chosen": true }, { "access_type": "ref", "index": "term_taxonomy_id", "chosen": false, "cause": "no predicate for first keypart" }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 3, "rows_out": 3, "cost": 285113.3612, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt,t,tr,p", "table": "trs", "rows_for_plan": 662760930, "cost_for_plan": 332574.1786, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p,trs", "get_costs_for_tables": [ { "best_access_path": { "table": "xs", "plan_details": { "record_count": 662760930 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 592799.9657, "chosen": true }, { "access_type": "range", "range_index": "taxonomy", "rows": 3, "rows_after_filter": 3, "rows_out": 1, "cost": 4143316.235, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 592799.9657, "uses_join_buffering": false } } }, { "best_access_path": { "table": "ts", "plan_details": { "record_count": 662760930 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 821842243.1, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 821842243.1, "uses_join_buffering": true } } } ] }, { "plan_prefix": "xt,t,tr,p,trs", "table": "xs", "rows_for_plan": 662760930, "cost_for_plan": 925374.1443, "pushdown_cond_selectivity": 4.183517e-4, "filtered": 0.041835169, "rows_out": 4.183517e-4, "selectivity": 4.183517e-4, "estimated_join_cardinality": 277267.158, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p,trs,xs", "get_costs_for_tables": [ { "best_access_path": { "table": "ts", "plan_details": { "record_count": 277267.158 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 248.0782992, "chosen": true }, { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 1, "cost": 343819.1743, "index_only": false, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 248.0782992, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt,t,tr,p,trs,xs", "table": "ts", "rows_for_plan": 277267.158, "cost_for_plan": 925622.2226, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p,trs,xs,ts", "get_costs_for_tables": [ { "best_access_path": { "table": "tc", "plan_details": { "record_count": 277267.158 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 343819.1743, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 343819.1743, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xc", "plan_details": { "record_count": 277267.158 }, "considered_access_paths": [ { "access_type": "range", "range_index": "taxonomy", "rows": 24, "rows_after_filter": 24, "rows_out": 24, "cost": 7517.799478, "chosen": true } ], "chosen_access_method": { "type": "range", "rows_read": 24, "rows_out": 24, "cost": 7517.799478, "uses_join_buffering": true } } }, { "best_access_path": { "table": "trc", "plan_details": { "record_count": 277267.158 }, "considered_access_paths": [ { "access_type": "ref", "index": "PRIMARY", "rows": 3, "cost": 358.0694249, "chosen": true }, { "access_type": "ref", "index": "term_taxonomy_id", "chosen": false, "cause": "no predicate for first keypart" }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 3, "rows_out": 3, "cost": 358.0694249, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt,t,tr,p,trs,xs,ts", "table": "trc", "rows_for_plan": 831801.474, "cost_for_plan": 925980.292, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p,trs,xs,ts,trc", "get_costs_for_tables": [ { "best_access_path": { "table": "xc", "plan_details": { "record_count": 831801.474 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 744.0759728, "chosen": true }, { "access_type": "range", "range_index": "taxonomy", "rows": 24, "rows_after_filter": 24, "rows_out": 1, "cost": 22553.3542, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 744.0759728, "uses_join_buffering": false } } }, { "best_access_path": { "table": "tc", "plan_details": { "record_count": 831801.474 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 1031457.364, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 1031457.364, "uses_join_buffering": true } } } ] }, { "plan_prefix": "xt,t,tr,p,trs,xs,ts,trc", "table": "xc", "rows_for_plan": 831801.474, "cost_for_plan": 926724.368, "pushdown_cond_selectivity": 0.003346814, "filtered": 0.334681355, "rows_out": 0.003346814, "selectivity": 0.003346814, "estimated_join_cardinality": 2783.884448, "rest_of_plan": [ { "plan_prefix": "xt,t,tr,p,trs,xs,ts,trc,xc", "get_costs_for_tables": [ { "best_access_path": { "table": "tc", "plan_details": { "record_count": 2783.884448 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 2.569480006, "chosen": true }, { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 1, "cost": 3452.174683, "index_only": false, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 2.569480006, "uses_join_buffering": false } } } ] }, { "plan_prefix": "xt,t,tr,p,trs,xs,ts,trc,xc", "table": "tc", "rows_for_plan": 2783.884448, "cost_for_plan": 926726.9375 } ] } ] }, { "plan_prefix": "xt,t,tr,p,trs,xs,ts", "table": "xc", "rows_for_plan": 6654411.792, "cost_for_plan": 933140.0221, "pruned_by_cost": true, "current_cost": 933140.0221, "best_cost": 926726.9375 }, { "plan_prefix": "xt,t,tr,p,trs,xs,ts", "table": "tc", "rows_for_plan": 2086435364, "cost_for_plan": 1269441.397, "pruned_by_cost": true, "current_cost": 1269441.397, "best_cost": 926726.9375 } ] } ] } ] }, { "plan_prefix": "xt,t,tr,p", "table": "xs", "rows_for_plan": 662760930, "cost_for_plan": 1428566.232, "pruned_by_cost": true, "current_cost": 1428566.232, "best_cost": 926726.9375 }, { "plan_prefix": "xt,t,tr,p", "table": "ts", "rows_for_plan": 1.662425e12, "cost_for_plan": 273994875.2, "pruned_by_cost": true, "current_cost": 273994875.2, "best_cost": 926726.9375 } ] } ] }, { "plan_prefix": "xt,t", "table": "p", "rows_for_plan": 16993870, "cost_for_plan": 2623.815485, "pruned_by_heuristic": true } ] }, { "plan_prefix": "xt", "table": "tr", "rows_for_plan": 3302, "cost_for_plan": 1.17605803, "pruned_by_heuristic": true }, { "plan_prefix": "xt", "table": "p", "rows_for_plan": 16993870, "cost_for_plan": 1589.159943, "pruned_by_heuristic": true } ] }, { "plan_prefix": "", "table": "t", "rows_for_plan": 7525, "cost_for_plan": 1.3194906, "rest_of_plan": [ { "plan_prefix": "t", "get_costs_for_tables": [ { "best_access_path": { "table": "xt", "plan_details": { "record_count": 7525 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "term_id_taxonomy", "rows": 1, "cost": 6.650348825, "chosen": true }, { "access_type": "ref", "index": "taxonomy", "used_range_estimates": true, "rows": 254, "cost": 1905.114532, "chosen": false, "cause": "cost" }, { "access_type": "range", "range_index": "taxonomy", "rows": 254, "rows_after_filter": 254, "rows_out": 1, "cost": 179.817027, "cost_without_join_buffer": 1911.06771, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 6.650348825, "uses_join_buffering": false } } }, { "best_access_path": { "table": "p", "plan_details": { "record_count": 7525 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 46824.57234, "cost_without_join_buffer": 74157.23034, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 46824.57234, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 7525 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 92590, "rows_after_filter": 92590, "rows_out": 92590, "cost": 64799.19651, "cost_without_join_buffer": 102293.4848, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 92590, "rows_out": 92590, "cost": 64799.19651, "uses_join_buffering": true } } } ] }, { "plan_prefix": "t", "table": "xt", "rows_for_plan": 7525, "cost_for_plan": 7.969839425, "rest_of_plan": [ { "plan_prefix": "t,xt", "get_costs_for_tables": [ { "best_access_path": { "table": "p", "plan_details": { "record_count": 7525 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 77507.59501, "cost_without_join_buffer": 74157.23034, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 77507.59501, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 7525 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_taxonomy_id", "rows": 13, "cost": 20.71880333, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 13, "rows_out": 13, "cost": 20.71880333, "uses_join_buffering": false } } } ] }, { "plan_prefix": "t,xt", "table": "tr", "rows_for_plan": 97825, "cost_for_plan": 28.68864275, "rest_of_plan": [ { "plan_prefix": "t,xt,tr", "get_costs_for_tables": [ { "best_access_path": { "table": "p", "plan_details": { "record_count": 97825 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 1405916.524, "cost_without_join_buffer": 964034.3508, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 1405916.524, "uses_join_buffering": true } } } ] }, { "plan_prefix": "t,xt,tr", "table": "p", "rows_for_plan": 6544981625, "cost_for_plan": 1405945.213, "pruned_by_cost": true, "current_cost": 1405945.213, "best_cost": 926726.9375 } ] }, { "plan_prefix": "t,xt", "table": "p", "rows_for_plan": 503460125, "cost_for_plan": 77515.56485, "pruned_by_heuristic": true } ] }, { "plan_prefix": "t", "table": "p", "rows_for_plan": 503460125, "cost_for_plan": 46825.89183, "pruned_by_heuristic": true }, { "plan_prefix": "t", "table": "tr", "rows_for_plan": 696739750, "cost_for_plan": 64800.516, "pruned_by_heuristic": true } ] }, { "plan_prefix": "", "table": "p", "rows_for_plan": 66905, "cost_for_plan": 10.65830984, "rest_of_plan": [ { "plan_prefix": "p", "get_costs_for_tables": [ { "best_access_path": { "table": "xt", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_id_taxonomy", "chosen": false, "cause": "no predicate for first keypart" }, { "access_type": "ref", "index": "taxonomy", "used_range_estimates": true, "rows": 254, "cost": 16937.78383, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 254, "rows_out": 254, "cost": 16937.78383, "uses_join_buffering": false } } }, { "best_access_path": { "table": "t", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 46815.52097, "cost_without_join_buffer": 82964.16618, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 46815.52097, "uses_join_buffering": true } } }, { "best_access_path": { "table": "ts", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 82964.16618, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 82964.16618, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xs", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "range", "range_index": "taxonomy", "rows": 3, "rows_after_filter": 3, "rows_out": 3, "cost": 418.2682132, "chosen": true } ], "chosen_access_method": { "type": "range", "rows_read": 3, "rows_out": 3, "cost": 418.2682132, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 92590, "rows_after_filter": 92590, "rows_out": 92590, "cost": 575909.6983, "cost_without_join_buffer": 909493.2617, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 92590, "rows_out": 92590, "cost": 575909.6983, "uses_join_buffering": true } } }, { "best_access_path": { "table": "trs", "plan_details": { "record_count": 66905 }, "considered_access_paths": [ { "access_type": "ref", "index": "PRIMARY", "rows": 3, "cost": 86.58233465, "chosen": true }, { "access_type": "ref", "index": "term_taxonomy_id", "chosen": false, "cause": "no predicate for first keypart" }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 3, "rows_out": 3, "cost": 86.58233465, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p", "table": "trs", "rows_for_plan": 200715, "cost_for_plan": 97.2406445, "rest_of_plan": [ { "plan_prefix": "p,trs", "get_costs_for_tables": [ { "best_access_path": { "table": "ts", "plan_details": { "record_count": 200715 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 248892.3396, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 248892.3396, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xs", "plan_details": { "record_count": 200715 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 179.606987, "chosen": true }, { "access_type": "range", "range_index": "taxonomy", "rows": 3, "rows_after_filter": 3, "rows_out": 1, "cost": 1254.794809, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 179.606987, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs", "table": "xs", "rows_for_plan": 200715, "cost_for_plan": 276.8476315, "pushdown_cond_selectivity": 4.183517e-4, "filtered": 0.041835169, "rows_out": 4.183517e-4, "selectivity": 4.183517e-4, "estimated_join_cardinality": 83.96946033, "rest_of_plan": [ { "plan_prefix": "p,trs,xs", "get_costs_for_tables": [ { "best_access_path": { "table": "ts", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 0.143893426, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 0.143893426, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs,xs", "table": "ts", "rows_for_plan": 83.96946033, "cost_for_plan": 276.9915249, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts", "get_costs_for_tables": [ { "best_access_path": { "table": "t", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 175.3820912, "cost_without_join_buffer": 104.2039611, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 175.3820912, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tc", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 104.2039611, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 104.2039611, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xt", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_id_taxonomy", "chosen": false, "cause": "no predicate for first keypart" }, { "access_type": "ref", "index": "taxonomy", "used_range_estimates": true, "rows": 254, "cost": 21.33966888, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 254, "rows_out": 254, "cost": 21.33966888, "uses_join_buffering": false } } }, { "best_access_path": { "table": "xc", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "range", "range_index": "taxonomy", "rows": 24, "rows_after_filter": 24, "rows_out": 24, "cost": 2.298852912, "chosen": true } ], "chosen_access_method": { "type": "range", "rows_read": 24, "rows_out": 24, "cost": 2.298852912, "uses_join_buffering": true } } }, { "best_access_path": { "table": "trc", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "ref", "index": "PRIMARY", "rows": 3, "cost": 0.177156248, "chosen": true }, { "access_type": "ref", "index": "term_taxonomy_id", "chosen": false, "cause": "no predicate for first keypart" }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 3, "rows_out": 3, "cost": 0.177156248, "uses_join_buffering": false } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 83.96946033 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 92590, "rows_after_filter": 92590, "rows_out": 92590, "cost": 2155.406052, "cost_without_join_buffer": 1141.61223, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 92590, "rows_out": 92590, "cost": 2155.406052, "uses_join_buffering": true } } } ] }, { "plan_prefix": "p,trs,xs,ts", "table": "trc", "rows_for_plan": 251.908381, "cost_for_plan": 277.1686812, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts,trc", "get_costs_for_tables": [ { "best_access_path": { "table": "tc", "plan_details": { "record_count": 251.908381 }, "considered_access_paths": [ { "access_type": "scan", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 312.4529586, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 312.4529586, "uses_join_buffering": true } } }, { "best_access_path": { "table": "xc", "plan_details": { "record_count": 251.908381 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 0.304779332, "chosen": true }, { "access_type": "range", "range_index": "taxonomy", "rows": 24, "rows_after_filter": 24, "rows_out": 1, "cost": 6.852321937, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 0.304779332, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs,xs,ts,trc", "table": "xc", "rows_for_plan": 251.908381, "cost_for_plan": 277.4734605, "pushdown_cond_selectivity": 0.003346814, "filtered": 0.334681355, "rows_out": 0.003346814, "selectivity": 0.003346814, "estimated_join_cardinality": 0.843090384, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts,trc,xc", "get_costs_for_tables": [ { "best_access_path": { "table": "tc", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 0.00171364, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 0.00171364, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc", "table": "tc", "rows_for_plan": 0.843090384, "cost_for_plan": 277.4751741, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts,trc,xc,tc", "get_costs_for_tables": [ { "best_access_path": { "table": "xt", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_id_taxonomy", "chosen": false, "cause": "no predicate for first keypart" }, { "access_type": "ref", "index": "taxonomy", "used_range_estimates": true, "rows": 254, "cost": 0.33344208, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 254, "rows_out": 254, "cost": 0.33344208, "uses_join_buffering": false } } }, { "best_access_path": { "table": "t", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 4.766468016, "cost_without_join_buffer": 1.3194906, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 4.766468016, "uses_join_buffering": true } } }, { "best_access_path": { "table": "tr", "plan_details": { "record_count": 1 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 92590, "rows_after_filter": 92590, "rows_out": 92590, "cost": 56.15409552, "cost_without_join_buffer": 13.74207407, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 92590, "rows_out": 92590, "cost": 56.15409552, "uses_join_buffering": true } } } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc", "table": "xt", "rows_for_plan": 214.1449575, "cost_for_plan": 277.8086162, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts,trc,xc,tc,xt", "get_costs_for_tables": [ { "best_access_path": { "table": "tr", "plan_details": { "record_count": 214.1449575 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_taxonomy_id", "rows": 13, "cost": 0.73366721, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 13, "rows_out": 13, "cost": 0.73366721, "uses_join_buffering": false } } }, { "best_access_path": { "table": "t", "plan_details": { "record_count": 214.1449575 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 0.271002216, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 0.271002216, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc,xt", "table": "t", "rows_for_plan": 214.1449575, "cost_for_plan": 278.0796184, "rest_of_plan": [ { "plan_prefix": "p,trs,xs,ts,trc,xc,tc,xt,t", "get_costs_for_tables": [ { "best_access_path": { "table": "tr", "plan_details": { "record_count": 214.1449575 }, "considered_access_paths": [ { "access_type": "ref", "index": "term_taxonomy_id", "rows": 13, "cost": 0.73366721, "chosen": true }, { "type": "scan", "chosen": false, "cause": "cost" } ], "chosen_access_method": { "type": "ref", "rows_read": 13, "rows_out": 13, "cost": 0.73366721, "uses_join_buffering": false } } } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc,xt,t", "table": "tr", "rows_for_plan": 2783.884448, "cost_for_plan": 278.8132856 } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc,xt", "table": "tr", "rows_for_plan": 2783.884448, "cost_for_plan": 278.5422834, "pruned_by_heuristic": true } ] }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc", "table": "t", "rows_for_plan": 6344.255139, "cost_for_plan": 282.2416422, "pruned_by_cost": true, "current_cost": 282.2416422, "best_cost": 278.8132856 }, { "plan_prefix": "p,trs,xs,ts,trc,xc,tc", "table": "tr", "rows_for_plan": 78061.73865, "cost_for_plan": 333.6292697, "pruned_by_cost": true, "current_cost": 333.6292697, "best_cost": 278.8132856 } ] } ] } ] }, { "plan_prefix": "p,trs,xs,ts", "table": "xc", "rows_for_plan": 2015.267048, "cost_for_plan": 279.2903778, "pruned_by_cost": true, "current_cost": 279.2903778, "best_cost": 278.8132856 }, { "plan_prefix": "p,trs,xs,ts", "table": "xt", "rows_for_plan": 21328.24292, "cost_for_plan": 298.3311938, "pruned_by_cost": true, "current_cost": 298.3311938, "best_cost": 278.8132856 }, { "plan_prefix": "p,trs,xs,ts", "table": "t", "rows_for_plan": 631870.189, "cost_for_plan": 452.3736161, "pruned_by_cost": true, "current_cost": 452.3736161, "best_cost": 278.8132856 }, { "plan_prefix": "p,trs,xs,ts", "table": "tc", "rows_for_plan": 631870.189, "cost_for_plan": 381.1954861, "pruned_by_cost": true, "current_cost": 381.1954861, "best_cost": 278.8132856 }, { "plan_prefix": "p,trs,xs,ts", "table": "tr", "rows_for_plan": 7774732.332, "cost_for_plan": 2432.397577, "pruned_by_cost": true, "current_cost": 2432.397577, "best_cost": 278.8132856 } ] } ] } ] }, { "plan_prefix": "p", "table": "xs", "rows_for_plan": 200715, "cost_for_plan": 428.926523, "pruned_by_cost": true, "current_cost": 428.926523, "best_cost": 278.8132856 }, { "plan_prefix": "p", "table": "xt", "rows_for_plan": 16993870, "cost_for_plan": 16948.44214, "pruned_by_cost": true, "current_cost": 16948.44214, "best_cost": 278.8132856 }, { "plan_prefix": "p", "table": "t", "rows_for_plan": 503460125, "cost_for_plan": 46826.17928, "pruned_by_cost": true, "current_cost": 46826.17928, "best_cost": 278.8132856 }, { "plan_prefix": "p", "table": "ts", "rows_for_plan": 503460125, "cost_for_plan": 82974.82449, "pruned_by_cost": true, "current_cost": 82974.82449, "best_cost": 278.8132856 }, { "plan_prefix": "p", "table": "tr", "rows_for_plan": 6194733950, "cost_for_plan": 575920.3566, "pruned_by_cost": true, "current_cost": 575920.3566, "best_cost": 278.8132856 } ] }, { "plan_prefix": "", "table": "tr", "rows_for_plan": 92590, "cost_for_plan": 13.74207407, "rest_of_plan": [ { "plan_prefix": "tr", "get_costs_for_tables": [ { "best_access_path": { "table": "xt", "plan_details": { "record_count": 92590 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 82.895662, "chosen": true }, { "access_type": "ref", "index": "term_id_taxonomy", "chosen": false, "cause": "no predicate for first keypart" }, { "access_type": "eq_ref", "index": "taxonomy", "rows": 1, "cost": 159.508022, "chosen": false, "cause": "cost" }, { "access_type": "range", "range_index": "taxonomy", "rows": 254, "rows_after_filter": 254, "rows_out": 1, "cost": 2191.250799, "cost_without_join_buffer": 23513.46056, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 82.895662, "uses_join_buffering": false } } }, { "best_access_path": { "table": "t", "plan_details": { "record_count": 92590 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 7525, "rows_after_filter": 7525, "rows_out": 7525, "cost": 64716.58884, "cost_without_join_buffer": 114814.2905, "index_only": false, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 7525, "rows_out": 7525, "cost": 64716.58884, "uses_join_buffering": true } } }, { "best_access_path": { "table": "p", "plan_details": { "record_count": 92590 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 575345.7303, "cost_without_join_buffer": 912445.129, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 575345.7303, "uses_join_buffering": true } } } ] }, { "plan_prefix": "tr", "table": "xt", "rows_for_plan": 92590, "cost_for_plan": 96.63773607, "pushdown_cond_selectivity": 0.035420443, "filtered": 3.542044345, "rows_out": 0.035420443, "selectivity": 0.035420443, "estimated_join_cardinality": 3279.578859, "rest_of_plan": [ { "plan_prefix": "tr,xt", "get_costs_for_tables": [ { "best_access_path": { "table": "t", "plan_details": { "record_count": 3279.578859 }, "considered_access_paths": [ { "access_type": "eq_ref", "index": "PRIMARY", "rows": 1, "cost": 3.012848915, "chosen": true }, { "access_type": "scan_with_join_cache", "rows": 7525, "rows_after_filter": 7525, "rows_out": 1, "cost": 3797.925196, "cost_without_join_buffer": 4066.849732, "index_only": false, "chosen": false } ], "chosen_access_method": { "type": "eq_ref", "rows_read": 1, "rows_out": 1, "cost": 3.012848915, "uses_join_buffering": false } } } ] }, { "plan_prefix": "tr,xt", "table": "t", "rows_for_plan": 3279.578859, "cost_for_plan": 99.65058498, "rest_of_plan": [ { "plan_prefix": "tr,xt,t", "get_costs_for_tables": [ { "best_access_path": { "table": "p", "plan_details": { "record_count": 3279.578859 }, "considered_access_paths": [ { "access_type": "scan_with_join_cache", "rows": 66905, "rows_after_filter": 66905, "rows_out": 66905, "cost": 47137.41776, "cost_without_join_buffer": 32319.98627, "index_only": true, "chosen": true } ], "chosen_access_method": { "type": "scan", "rows_read": 66905, "rows_out": 66905, "cost": 47137.41776, "uses_join_buffering": true } } } ] }, { "plan_prefix": "tr,xt,t", "table": "p", "rows_for_plan": 219420223.6, "cost_for_plan": 47237.06835, "pruned_by_cost": true, "current_cost": 47237.06835, "best_cost": 278.8132856 } ] } ] }, { "plan_prefix": "tr", "table": "p", "rows_for_plan": 6194733950, "cost_for_plan": 575359.4723, "pruned_by_cost": true, "current_cost": 575359.4723, "best_cost": 278.8132856 } ] } ] }, { "best_join_order": [ "p", "trs", "xs", "ts", "trc", "xc", "tc", "xt", "t", "tr" ], "rows": 2783.884448, "cost": 278.8132856 }, { "substitute_best_equal": { "condition": "WHERE", "resulting_condition": "t.term_id = xt.term_id and tr.term_taxonomy_id = xt.term_taxonomy_id and xt.taxonomy = 'pa_brand_master' and (tr.object_id = p.`ID` or tr.object_id = p.post_parent) and p.post_type like '%product%' and p.post_status = 'publish'" } }, { "substitute_best_equal": { "condition": "ON expr", "attached_to": "trs", "resulting_condition": "trs.object_id = p.`ID` and ts.term_id = xs.term_id and xs.term_taxonomy_id = trs.term_taxonomy_id and xs.taxonomy in ('pa_size','pa_megethos','pa_noumero')" } }, { "substitute_best_equal": { "condition": "ON expr", "attached_to": "trc", "resulting_condition": "trc.object_id = p.`ID` and tc.term_id = xc.term_id and xc.term_taxonomy_id = trc.term_taxonomy_id and xc.taxonomy in ('pa_color','pa_chroma','pa_colour')" } }, { "attaching_conditions_to_tables": { "attached_conditions_computation": [], "attached_conditions_summary": [ { "table": "p", "attached_condition": "p.post_type like '%product%' and p.post_status = 'publish'" }, { "table": "trs", "attached_condition": "trigcond(trs.term_taxonomy_id is not null)" }, { "table": "xs", "attached_condition": "trigcond(xs.taxonomy in ('pa_size','pa_megethos','pa_noumero') and xs.term_id is not null)" }, { "table": "ts", "attached_condition": null }, { "table": "trc", "attached_condition": "trigcond(trc.term_taxonomy_id is not null)" }, { "table": "xc", "attached_condition": "trigcond(xc.taxonomy in ('pa_color','pa_chroma','pa_colour') and xc.term_id is not null)" }, { "table": "tc", "attached_condition": null }, { "table": "xt", "attached_condition": "xt.taxonomy = 'pa_brand_master'" }, { "table": "t", "attached_condition": null }, { "table": "tr", "attached_condition": "tr.object_id = p.`ID` or tr.object_id = p.post_parent" } ] } }, { "make_join_readinfo": [ { "table": "xt", "index_condition": "xt.taxonomy = 'pa_brand_master'" } ] } ] } }, { "join_execution": { "select_id": 1, "steps": [] } } ] } MISSING_BYTES_BEYOND_MAX_MEM_SIZE: 0 INSUFFICIENT_PRIVILEGES: 0