{ "steps": [ { "subselect_execution": { "select#": 2, "steps": [ { "join_optimization": { "select#": 2, "steps": [ { "substitute_generated_columns": { } }, { "table_dependencies": [ { "table": "`table1` `t1`", "row_may_be_null": false, "map_bit": 0, "depends_on_map_bits": [ ] }, { "table": "`table2` `t2`", "row_may_be_null": false, "map_bit": 1, "depends_on_map_bits": [ ] } ] }, { "rows_estimation": [ { "table": "`table1` `t1`", "table_scan": { "rows": 171, "cost": 0.25 } }, { "table": "`table2` `t2`", "table_scan": { "rows": 5624, "cost": 24.25 } } ] }, { "considered_execution_plans": [ { "plan_prefix": [ ], "table": "`table1` `t1`", "best_access_path": { "considered_access_paths": [ { "rows_to_scan": 171, "access_type": "scan", "resulting_rows": 171, "cost": 17.35, "chosen": true } ] }, "condition_filtering_pct": 100, "rows_for_plan": 171, "cost_for_plan": 17.35, "rest_of_plan": [ { "plan_prefix": [ "`table1` `t1`" ], "table": "`table2` `t2`", "best_access_path": { "considered_access_paths": [ { "rows_to_scan": 5624, "access_type": "scan", "using_join_cache": true, "buffers_needed": 1, "resulting_rows": 5624, "cost": 96194.8, "chosen": true } ] }, "condition_filtering_pct": 100, "rows_for_plan": 961704, "cost_for_plan": 96212.2, "chosen": true } ] }, { "plan_prefix": [ ], "table": "`table2` `t2`", "best_access_path": { "considered_access_paths": [ { "rows_to_scan": 5624, "access_type": "scan", "resulting_rows": 5624, "cost": 586.65, "chosen": true } ] }, "condition_filtering_pct": 100, "rows_for_plan": 5624, "cost_for_plan": 586.65, "pruned_by_heuristic": true } ] }, { "attaching_conditions_to_tables": { "original_condition": null, "attached_conditions_computation": [ ], "attached_conditions_summary": [ { "table": "`table1` `t1`", "attached": null }, { "table": "`table2` `t2`", "attached": null } ] } }, { "optimizing_distinct_group_by_order_by": { "simplifying_order_by": { "original_clause": "`t1`.`col1` desc", "items": [ { "item": "`t1`.`col1`" } ], "resulting_clause_is_simple": true, "resulting_clause": "`t1`.`col1` desc" } } }, { "finalizing_table_conditions": [ ] }, { "refine_plan": [ { "table": "`table1` `t1`" }, { "table": "`table2` `t2`" } ] }, { "considering_tmp_tables": [ { "adding_tmp_table_in_plan_at_position": 2, "write_method": "write_all_rows" }, { "adding_sort_to_table": "" } ] } ] } }, { "join_execution": { "select#": 2, "steps": [ { "sorting_table": "", "filesort_information": [ { "direction": "desc", "expression": "`t1`.`col1`" } ], "filesort_priority_queue_optimization": { "limit": 1, "chosen": true }, "filesort_execution": [ ], "filesort_summary": { "memory_available": 262144, "key_size": 8, "row_size": 15, "max_rows_per_buffer": 2, "num_rows_estimate": 961704, "num_rows_found": 4501642, "num_initial_chunks_spilled_to_disk": 0, "peak_memory_used": 46, "sort_algorithm": "std::sort", "unpacked_addon_fields": "using_priority_queue", "sort_mode": "" } } ] } } ] } } ] }