{
  "steps": [
    {
      "join_preparation": {
        "select_id": 1,
        "steps": [
          {
            "expanded_query": "select a.reference_number AS reference_number,b.validation_date AS validation_date from (table_a a left join table_b b on(a.id = b.fk_id)) limit 1"
          }
        ]
      }
    },
    {
      "join_optimization": {
        "select_id": 1,
        "steps": [
          {
            "build_equal_items": {
              "condition": "ON expr",
              "attached_to": "b",
              "resulting_condition": "multiple equal(a.id, b.fk_id)"
            }
          },
          {
            "table_dependencies": [
              {
                "table": "a",
                "row_may_be_null": false,
                "map_bit": 0,
                "depends_on_map_bits": []
              },
              {
                "table": "b",
                "row_may_be_null": true,
                "map_bit": 1,
                "depends_on_map_bits": [
                  "0"
                ]
              }
            ]
          },
          {
            "ref_optimizer_key_uses": [
              {
                "table": "b",
                "index": "idx_fk",
                "field": "fk_id",
                "equals": "a.id",
                "null_rejecting": true
              }
            ]
          },
          {
            "eliminated_tables": []
          },
          {
            "rows_estimation": [
              {
                "table": "a",
                "table_scan": {
                  "rows": 25762,
                  "cost": 481
                }
              },
              {
                "table": "b",
                "table_scan": {
                  "rows": 108464,
                  "cost": 353
                }
              }
            ]
          },
          {
            "considered_execution_plans": [
              {
                "plan_prefix": [],
                "get_costs_for_tables": [
                  {
                    "best_access_path": {
                      "table": "a",
                      "considered_access_paths": [
                        {
                          "access_type": "scan",
                          "resulting_rows": 25762,
                          "cost": 481,
                          "chosen": true
                        }
                      ],
                      "chosen_access_method": {
                        "type": "scan",
                        "records": 25762,
                        "cost": 481,
                        "uses_join_buffering": false
                      }
                    }
                  }
                ]
              },
              {
                "plan_prefix": [],
                "table": "a",
                "rows_for_plan": 25762,
                "cost_for_plan": 5633.4,
                "rest_of_plan": [
                  {
                    "plan_prefix": [
                      "a"
                    ],
                    "get_costs_for_tables": [
                      {
                        "best_access_path": {
                          "table": "b",
                          "considered_access_paths": [
                            {
                              "access_type": "ref",
                              "index": "idx_fk",
                              "rows": 54232,
                              "cost": 27461203.35,
                              "chosen": true
                            },
                            {
                              "access_type": "scan",
                              "resulting_rows": 108464,
                              "cost": 9093986,
                              "chosen": false
                            }
                          ],
                          "chosen_access_method": {
                            "type": "ref",
                            "records": 54232,
                            "cost": 27461203.35,
                            "uses_join_buffering": false
                          }
                        }
                      }
                    ]
                  },
                  {
                    "plan_prefix": [
                      "a"
                    ],
                    "table": "b",
                    "rows_for_plan": 1397124784,
                    "cost_for_plan": 306891793.5
                  }
                ]
              }
            ]
          },
          {
            "best_join_order": [
              "a",
              "b"
            ]
          },
          {
            "substitute_best_equal": {
              "condition": "WHERE",
              "resulting_condition": "1"
            }
          },
          {
            "substitute_best_equal": {
              "condition": "ON expr",
              "attached_to": "b",
              "resulting_condition": "b.fk_id = a.id"
            }
          },
          {
            "condition_on_constant_tables": "1",
            "computing_condition": []
          },
          {
            "attaching_conditions_to_tables": {
              "attached_conditions_computation": [],
              "attached_conditions_summary": [
                {
                  "table": "a",
                  "attached": null
                },
                {
                  "table": "b",
                  "attached": null
                }
              ]
            }
          }
        ]
      }
    }
  ]
}
