mysql: [Warning] Using a password on the command line interface can be insecure.
+--------------------------------+---------+----------+----------+
| Table                          | Op      | Msg_type | Msg_text |
+--------------------------------+---------+----------+----------+
| optimizer_join_filter_repro.t0 | analyze | status   | OK       |
| optimizer_join_filter_repro.t1 | analyze | status   | OK       |
| optimizer_join_filter_repro.t2 | analyze | status   | OK       |
+--------------------------------+---------+----------+----------+
+-------------+
| marker      |
+-------------+
| ENVIRONMENT |
+-------------+
+---------------+-----------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| mysql_version | optimizer_prune_level | optimizer_search_depth | optimizer_switch                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+---------------+-----------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 9.7.1         |                     1 |                     62 | index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on,hash_join=on,subquery_to_derived=off,prefer_ordering_index=on,hypergraph_optimizer=off,derived_condition_pushdown=on,hash_set_operations=on |
+---------------+-----------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------+---------+---------+
| t0_rows | t1_rows | t2_rows |
+---------+---------+---------+
|    1000 |    1000 |    1000 |
+---------+---------+---------+
+-----------+-----------+-----------+-----------------+
| t0_min_c2 | t0_max_c2 | t0_ndv_c2 | t0_matches_1000 |
+-----------+-----------+-----------+-----------------+
|         3 |      2001 |      1000 |               0 |
+-----------+-----------+-----------+-----------------+
+-----------+-----------+-----------+-----------------+-----------+
| t1_min_c2 | t1_max_c2 | t1_ndv_c2 | t1_matches_1000 | t1_ndv_c0 |
+-----------+-----------+-----------+-----------------+-----------+
|         3 |      2001 |      1000 |               0 |        32 |
+-----------+-----------+-----------+-----------------+-----------+
+----+-----+
| c0 | cnt |
+----+-----+
|  1 | 100 |
|  2 |  30 |
|  3 |  29 |
|  4 |  29 |
|  5 |  29 |
|  6 |  29 |
|  7 |  29 |
|  8 |  29 |
|  9 |  29 |
| 10 |  29 |
| 11 |  29 |
| 12 |  29 |
| 13 |  29 |
| 14 |  29 |
| 15 |  29 |
| 16 |  29 |
| 17 |  29 |
| 18 |  29 |
| 19 |  29 |
| 20 |  29 |
| 21 |  29 |
| 22 |  29 |
| 23 |  29 |
| 24 |  29 |
| 25 |  29 |
| 26 |  29 |
| 27 |  29 |
| 28 |  29 |
| 29 |  29 |
| 30 |  29 |
| 31 |  29 |
| 32 |  29 |
+----+-----+
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| t1    |          1 | i1       |            1 | c0          | A         |          32 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
+----------------+
| marker         |
+----------------+
| CASE_1_DEFAULT |
+----------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1`,`optimizer_join_filter_repro`.`t2`.`c2` AS `ref2` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t1`.`c0` = `optimizer_join_filter_repro`.`t2`.`c1`) and (`optimizer_join_filter_repro`.`t0`.`c2` = `optimizer_join_filter_repro`.`t1`.`c2`) and (`optimizer_join_filter_repro`.`t1`.`c2` = 1000)) order by `optimizer_join_filter_repro`.`t2`.`c0` desc limit 3",
  "query_plan": {
    "limit": 3,
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "inputs": [
                  {
                    "operation": "Table scan on t0",
                    "table_name": "t0",
                    "access_type": "table",
                    "schema_name": "optimizer_join_filter_repro",
                    "used_columns": [
                      "c0",
                      "c2"
                    ],
                    "estimated_rows": 1000.0,
                    "estimated_total_cost": 0.016875644428490433
                  },
                  {
                    "inputs": [
                      {
                        "operation": "Table scan on t2",
                        "table_name": "t2",
                        "access_type": "table",
                        "schema_name": "optimizer_join_filter_repro",
                        "used_columns": [
                          "c0",
                          "c1",
                          "c2"
                        ],
                        "estimated_rows": 1000.0,
                        "estimated_total_cost": 101.25
                      },
                      {
                        "inputs": [
                          {
                            "covering": false,
                            "operation": "Index lookup on t1 using i1 (c0 = t2.c1)",
                            "index_name": "i1",
                            "table_name": "t1",
                            "access_type": "index",
                            "key_columns": [
                              "c0"
                            ],
                            "schema_name": "optimizer_join_filter_repro",
                            "used_columns": [
                              "c0",
                              "c2"
                            ],
                            "estimated_rows": 31.25,
                            "lookup_condition": "c0 = t2.c1",
                            "index_access_type": "index_lookup",
                            "lookup_references": [
                              "optimizer_join_filter_repro.t2.c1"
                            ],
                            "estimated_total_cost": 3.753125
                          }
                        ],
                        "condition": "(t1.c2 = 1000)",
                        "operation": "Filter: (t1.c2 = 1000)",
                        "access_type": "filter",
                        "estimated_rows": 31.25,
                        "filter_columns": [
                          "optimizer_join_filter_repro.t1.c2"
                        ],
                        "estimated_total_cost": 3.753125
                      }
                    ],
                    "heading": "Hash",
                    "join_type": "inner join",
                    "operation": "Nested loop inner join",
                    "access_type": "join",
                    "estimated_rows": 31250.0,
                    "join_algorithm": "nested_loop",
                    "estimated_total_cost": 6976.25
                  }
                ],
                "join_type": "inner join",
                "operation": "Inner hash join (t0.c2 = t1.c2)",
                "access_type": "join",
                "join_columns": [
                  "optimizer_join_filter_repro.t0.c2",
                  "optimizer_join_filter_repro.t1.c2"
                ],
                "estimated_rows": 312500.02211891115,
                "hash_condition": [
                  "(t0.c2 = t1.c2)"
                ],
                "join_algorithm": "hash",
                "estimated_total_cost": 3132502.6139060007
              }
            ],
            "operation": "Stream results",
            "access_type": "stream",
            "estimated_rows": 312500.02211891115,
            "estimated_total_cost": 3132502.6139060007
          }
        ],
        "operation": "Sort: t2.c0 DESC, limit input to 3 row(s) per chunk",
        "access_type": "sort",
        "sort_fields": [
          "t2.c0 DESC"
        ],
        "per_chunk_limit": 3
      }
    ],
    "operation": "Limit: 3 row(s)",
    "access_type": "limit",
    "limit_offset": 0
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=111..111 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=111..111 rows=0 loops=1)
        -> Stream results  (cost=3.13e+6 rows=312500) (actual time=111..111 rows=0 loops=1)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500) (actual time=111..111 rows=0 loops=1)
                -> Table scan on t0  (cost=0.0169 rows=1000) (never executed)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250) (actual time=111..111 rows=0 loops=1)
                        -> Table scan on t2  (cost=101 rows=1000) (actual time=0.00713..0.525 rows=1000 loops=1)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.111..0.111 rows=0 loops=1000)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00202..0.106 rows=85.8 loops=1000)
 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=109..109 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=109..109 rows=0 loops=1)
        -> Stream results  (cost=3.13e+6 rows=312500) (actual time=109..109 rows=0 loops=1)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500) (actual time=109..109 rows=0 loops=1)
                -> Table scan on t0  (cost=0.0169 rows=1000) (never executed)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250) (actual time=109..109 rows=0 loops=1)
                        -> Table scan on t2  (cost=101 rows=1000) (actual time=0.0113..0.51 rows=1000 loops=1)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.108..0.108 rows=0 loops=1000)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00198..0.104 rows=85.8 loops=1000)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=111..111 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=111..111 rows=0 loops=1)
        -> Stream results  (cost=3.13e+6 rows=312500) (actual time=111..111 rows=0 loops=1)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500) (actual time=111..111 rows=0 loops=1)
                -> Table scan on t0  (cost=0.0169 rows=1000) (never executed)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250) (actual time=111..111 rows=0 loops=1)
                        -> Table scan on t2  (cost=101 rows=1000) (actual time=0.0101..0.529 rows=1000 loops=1)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.111..0.111 rows=0 loops=1000)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00204..0.106 rows=85.8 loops=1000)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------+
| marker                 |
+------------------------+
| CASE_2_FORCED_T0_T1_T2 |
+------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select /*+ JOIN_ORDER(@`select#1` `t0`,`t1`,`t2`) */ `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1`,`optimizer_join_filter_repro`.`t2`.`c2` AS `ref2` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t2`.`c1` = `optimizer_join_filter_repro`.`t1`.`c0`) and (`optimizer_join_filter_repro`.`t1`.`c2` = `optimizer_join_filter_repro`.`t0`.`c2`) and (`optimizer_join_filter_repro`.`t0`.`c2` = 1000)) order by `optimizer_join_filter_repro`.`t2`.`c0` desc limit 3",
  "query_plan": {
    "limit": 3,
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "inputs": [
                  {
                    "operation": "Table scan on t2",
                    "table_name": "t2",
                    "access_type": "table",
                    "schema_name": "optimizer_join_filter_repro",
                    "used_columns": [
                      "c0",
                      "c1",
                      "c2"
                    ],
                    "estimated_rows": 1000.0,
                    "estimated_total_cost": 0.0012775878719985488
                  },
                  {
                    "inputs": [
                      {
                        "operation": "Table scan on t1",
                        "table_name": "t1",
                        "access_type": "table",
                        "schema_name": "optimizer_join_filter_repro",
                        "used_columns": [
                          "c0",
                          "c2"
                        ],
                        "estimated_rows": 1000.0,
                        "estimated_total_cost": 0.112576293759048
                      },
                      {
                        "inputs": [
                          {
                            "operation": "Table scan on t0",
                            "table_name": "t0",
                            "access_type": "table",
                            "schema_name": "optimizer_join_filter_repro",
                            "used_columns": [
                              "c0",
                              "c2"
                            ],
                            "estimated_rows": 1000.0,
                            "estimated_total_cost": 101.25
                          }
                        ],
                        "heading": "Hash",
                        "condition": "(t0.c2 = 1000)",
                        "operation": "Filter: (t0.c2 = 1000)",
                        "access_type": "filter",
                        "estimated_rows": 100.00000149011612,
                        "filter_columns": [
                          "optimizer_join_filter_repro.t0.c2"
                        ],
                        "estimated_total_cost": 101.25
                      }
                    ],
                    "heading": "Hash",
                    "join_type": "inner join",
                    "operation": "Inner hash join (t1.c2 = t0.c2)",
                    "access_type": "join",
                    "join_columns": [
                      "optimizer_join_filter_repro.t0.c2",
                      "optimizer_join_filter_repro.t1.c2"
                    ],
                    "estimated_rows": 10000.000298023226,
                    "hash_condition": [
                      "(t1.c2 = t0.c2)"
                    ],
                    "join_algorithm": "hash",
                    "estimated_total_cost": 10102.507778406256
                  }
                ],
                "join_type": "inner join",
                "operation": "Inner hash join (t2.c1 = t1.c0)",
                "access_type": "join",
                "join_columns": [
                  "optimizer_join_filter_repro.t1.c0",
                  "optimizer_join_filter_repro.t2.c1"
                ],
                "estimated_rows": 1000000.0447034842,
                "hash_condition": [
                  "(t2.c1 = t1.c0)"
                ],
                "join_algorithm": "hash",
                "estimated_total_cost": 1010105.3134596806
              }
            ],
            "operation": "Stream results",
            "access_type": "stream",
            "estimated_rows": 1000000.0447034842,
            "estimated_total_cost": 1010105.3134596806
          }
        ],
        "operation": "Sort: t2.c0 DESC, limit input to 3 row(s) per chunk",
        "access_type": "sort",
        "sort_fields": [
          "t2.c0 DESC"
        ],
        "per_chunk_limit": 3
      }
    ],
    "operation": "Limit: 3 row(s)",
    "access_type": "limit",
    "limit_offset": 0
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=0.481..0.481 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=0.48..0.48 rows=0 loops=1)
        -> Stream results  (cost=1.01e+6 rows=1e+6) (actual time=0.474..0.474 rows=0 loops=1)
            -> Inner hash join (t2.c1 = t1.c0)  (cost=1.01e+6 rows=1e+6) (actual time=0.472..0.472 rows=0 loops=1)
                -> Table scan on t2  (cost=0.00128 rows=1000) (never executed)
                -> Hash
                    -> Inner hash join (t1.c2 = t0.c2)  (cost=10103 rows=10000) (actual time=0.471..0.471 rows=0 loops=1)
                        -> Table scan on t1  (cost=0.113 rows=1000) (never executed)
                        -> Hash
                            -> Filter: (t0.c2 = 1000)  (cost=101 rows=100) (actual time=0.468..0.468 rows=0 loops=1)
                                -> Table scan on t0  (cost=101 rows=1000) (actual time=0.00969..0.416 rows=1000 loops=1)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=0.482..0.482 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=0.481..0.481 rows=0 loops=1)
        -> Stream results  (cost=1.01e+6 rows=1e+6) (actual time=0.477..0.477 rows=0 loops=1)
            -> Inner hash join (t2.c1 = t1.c0)  (cost=1.01e+6 rows=1e+6) (actual time=0.476..0.476 rows=0 loops=1)
                -> Table scan on t2  (cost=0.00128 rows=1000) (never executed)
                -> Hash
                    -> Inner hash join (t1.c2 = t0.c2)  (cost=10103 rows=10000) (actual time=0.474..0.474 rows=0 loops=1)
                        -> Table scan on t1  (cost=0.113 rows=1000) (never executed)
                        -> Hash
                            -> Filter: (t0.c2 = 1000)  (cost=101 rows=100) (actual time=0.473..0.473 rows=0 loops=1)
                                -> Table scan on t0  (cost=101 rows=1000) (actual time=0.00645..0.418 rows=1000 loops=1)
 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=0.46..0.46 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=0.459..0.459 rows=0 loops=1)
        -> Stream results  (cost=1.01e+6 rows=1e+6) (actual time=0.456..0.456 rows=0 loops=1)
            -> Inner hash join (t2.c1 = t1.c0)  (cost=1.01e+6 rows=1e+6) (actual time=0.455..0.455 rows=0 loops=1)
                -> Table scan on t2  (cost=0.00128 rows=1000) (never executed)
                -> Hash
                    -> Inner hash join (t1.c2 = t0.c2)  (cost=10103 rows=10000) (actual time=0.454..0.454 rows=0 loops=1)
                        -> Table scan on t1  (cost=0.113 rows=1000) (never executed)
                        -> Hash
                            -> Filter: (t0.c2 = 1000)  (cost=101 rows=100) (actual time=0.453..0.453 rows=0 loops=1)
                                -> Table scan on t0  (cost=101 rows=1000) (actual time=0.00622..0.4 rows=1000 loops=1)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------+
| marker               |
+----------------------+
| CASE_3_PRUNE_LEVEL_0 |
+----------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1`,`optimizer_join_filter_repro`.`t2`.`c2` AS `ref2` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t1`.`c0` = `optimizer_join_filter_repro`.`t2`.`c1`) and (`optimizer_join_filter_repro`.`t0`.`c2` = `optimizer_join_filter_repro`.`t1`.`c2`) and (`optimizer_join_filter_repro`.`t1`.`c2` = 1000)) order by `optimizer_join_filter_repro`.`t2`.`c0` desc limit 3",
  "query_plan": {
    "limit": 3,
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "inputs": [
                  {
                    "operation": "Table scan on t0",
                    "table_name": "t0",
                    "access_type": "table",
                    "schema_name": "optimizer_join_filter_repro",
                    "used_columns": [
                      "c0",
                      "c2"
                    ],
                    "estimated_rows": 1000.0,
                    "estimated_total_cost": 0.016875644428490433
                  },
                  {
                    "inputs": [
                      {
                        "operation": "Table scan on t2",
                        "table_name": "t2",
                        "access_type": "table",
                        "schema_name": "optimizer_join_filter_repro",
                        "used_columns": [
                          "c0",
                          "c1",
                          "c2"
                        ],
                        "estimated_rows": 1000.0,
                        "estimated_total_cost": 101.25
                      },
                      {
                        "inputs": [
                          {
                            "covering": false,
                            "operation": "Index lookup on t1 using i1 (c0 = t2.c1)",
                            "index_name": "i1",
                            "table_name": "t1",
                            "access_type": "index",
                            "key_columns": [
                              "c0"
                            ],
                            "schema_name": "optimizer_join_filter_repro",
                            "used_columns": [
                              "c0",
                              "c2"
                            ],
                            "estimated_rows": 31.25,
                            "lookup_condition": "c0 = t2.c1",
                            "index_access_type": "index_lookup",
                            "lookup_references": [
                              "optimizer_join_filter_repro.t2.c1"
                            ],
                            "estimated_total_cost": 3.753125
                          }
                        ],
                        "condition": "(t1.c2 = 1000)",
                        "operation": "Filter: (t1.c2 = 1000)",
                        "access_type": "filter",
                        "estimated_rows": 31.25,
                        "filter_columns": [
                          "optimizer_join_filter_repro.t1.c2"
                        ],
                        "estimated_total_cost": 3.753125
                      }
                    ],
                    "heading": "Hash",
                    "join_type": "inner join",
                    "operation": "Nested loop inner join",
                    "access_type": "join",
                    "estimated_rows": 31250.0,
                    "join_algorithm": "nested_loop",
                    "estimated_total_cost": 6976.25
                  }
                ],
                "join_type": "inner join",
                "operation": "Inner hash join (t0.c2 = t1.c2)",
                "access_type": "join",
                "join_columns": [
                  "optimizer_join_filter_repro.t0.c2",
                  "optimizer_join_filter_repro.t1.c2"
                ],
                "estimated_rows": 312500.02211891115,
                "hash_condition": [
                  "(t0.c2 = t1.c2)"
                ],
                "join_algorithm": "hash",
                "estimated_total_cost": 3132502.6139060007
              }
            ],
            "operation": "Stream results",
            "access_type": "stream",
            "estimated_rows": 312500.02211891115,
            "estimated_total_cost": 3132502.6139060007
          }
        ],
        "operation": "Sort: t2.c0 DESC, limit input to 3 row(s) per chunk",
        "access_type": "sort",
        "sort_fields": [
          "t2.c0 DESC"
        ],
        "per_chunk_limit": 3
      }
    ],
    "operation": "Limit: 3 row(s)",
    "access_type": "limit",
    "limit_offset": 0
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=110..110 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=110..110 rows=0 loops=1)
        -> Stream results  (cost=3.13e+6 rows=312500) (actual time=110..110 rows=0 loops=1)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500) (actual time=110..110 rows=0 loops=1)
                -> Table scan on t0  (cost=0.0169 rows=1000) (never executed)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250) (actual time=110..110 rows=0 loops=1)
                        -> Table scan on t2  (cost=101 rows=1000) (actual time=0.00683..0.517 rows=1000 loops=1)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.11..0.11 rows=0 loops=1000)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00198..0.105 rows=85.8 loops=1000)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------+
| marker                 |
+------------------------+
| CASE_4_OPTIMIZER_TRACE |
+------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk
        -> Stream results  (cost=3.13e+6 rows=312500)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500)
                -> Table scan on t0  (cost=0.0169 rows=1000)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250)
                        -> Table scan on t2  (cost=101 rows=1000)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2)
 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| TRACE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "steps": [
    {
      "join_preparation": {
        "select#": 1,
        "steps": [
          {
            "expanded_query": "/* select#1 */ select `t2`.`c0` AS `ref0`,`t0`.`c0` AS `ref1`,`t2`.`c2` AS `ref2` from ((`t2` join `t1` on((`t2`.`c1` = `t1`.`c0`))) join `t0` on((`t1`.`c2` = `t0`.`c2`))) where (`t0`.`c2` = 1000) order by `t2`.`c0` desc limit 3"
          },
          {
            "transformations_to_nested_joins": {
              "transformations": [
                "JOIN_condition_to_WHERE",
                "parenthesis_removal"
              ],
              "expanded_query": "/* select#1 */ select `t2`.`c0` AS `ref0`,`t0`.`c0` AS `ref1`,`t2`.`c2` AS `ref2` from `t2` join `t1` join `t0` where ((`t0`.`c2` = 1000) and (`t1`.`c2` = `t0`.`c2`) and (`t2`.`c1` = `t1`.`c0`)) order by `t2`.`c0` desc limit 3"
            }
          }
        ]
      }
    },
    {
      "join_optimization": {
        "select#": 1,
        "steps": [
          {
            "condition_processing": {
              "condition": "WHERE",
              "original_condition": "((`t0`.`c2` = 1000) and (`t1`.`c2` = `t0`.`c2`) and (`t2`.`c1` = `t1`.`c0`))",
              "steps": [
                {
                  "transformation": "equality_propagation",
                  "resulting_condition": "((`t0`.`c2` = 1000) and multiple equal(`t1`.`c2`, `t0`.`c2`) and multiple equal(`t2`.`c1`, `t1`.`c0`))"
                },
                {
                  "transformation": "constant_propagation",
                  "resulting_condition": "((`t0`.`c2` = 1000) and multiple equal(`t1`.`c2`, `t0`.`c2`) and multiple equal(`t2`.`c1`, `t1`.`c0`))"
                },
                {
                  "transformation": "trivial_condition_removal",
                  "resulting_condition": "((`t0`.`c2` = 1000) and multiple equal(`t1`.`c2`, `t0`.`c2`) and multiple equal(`t2`.`c1`, `t1`.`c0`))"
                }
              ]
            }
          },
          {
            "substitute_generated_columns": {
            }
          },
          {
            "table_dependencies": [
              {
                "table": "`t2`",
                "row_may_be_null": false,
                "map_bit": 0,
                "depends_on_map_bits": [
                ]
              },
              {
                "table": "`t1`",
                "row_may_be_null": false,
                "map_bit": 1,
                "depends_on_map_bits": [
                ]
              },
              {
                "table": "`t0`",
                "row_may_be_null": false,
                "map_bit": 2,
                "depends_on_map_bits": [
                ]
              }
            ]
          },
          {
            "ref_optimizer_key_uses": [
              {
                "table": "`t1`",
                "field": "c0",
                "equals": "`t2`.`c1`",
                "null_rejecting": true
              }
            ]
          },
          {
            "rows_estimation": [
              {
                "table": "`t2`",
                "table_scan": {
                  "rows": 1000,
                  "cost": 1.25
                }
              },
              {
                "table": "`t1`",
                "table_scan": {
                  "rows": 1000,
                  "cost": 1.25
                }
              },
              {
                "table": "`t0`",
                "table_scan": {
                  "rows": 1000,
                  "cost": 1.25
                }
              }
            ]
          },
          {
            "considered_execution_plans": [
              {
                "plan_prefix": [
                ],
                "table": "`t2`",
                "best_access_path": {
                  "considered_access_paths": [
                    {
                      "rows_to_scan": 1000,
                      "filtering_effect": [
                      ],
                      "final_filtering_effect": 1,
                      "access_type": "scan",
                      "resulting_rows": 1000,
                      "cost": 101.25,
                      "chosen": true
                    }
                  ]
                },
                "condition_filtering_pct": 100,
                "rows_for_plan": 1000,
                "cost_for_plan": 101.25,
                "rest_of_plan": [
                  {
                    "plan_prefix": [
                      "`t2`"
                    ],
                    "table": "`t1`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "access_type": "ref",
                          "index": "i1",
                          "rows": 31.25,
                          "cost": 6875,
                          "chosen": true
                        },
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 1000,
                          "cost": 100001,
                          "chosen": false
                        }
                      ]
                    },
                    "condition_filtering_pct": 100,
                    "rows_for_plan": 31250,
                    "cost_for_plan": 6976.25,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t2`",
                          "`t1`"
                        ],
                        "table": "`t0`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 0.1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 5,
                              "resulting_rows": 100,
                              "cost": 313026,
                              "chosen": true
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 312500,
                        "cost_for_plan": 320003,
                        "chosen": true
                      }
                    ]
                  },
                  {
                    "plan_prefix": [
                      "`t2`"
                    ],
                    "table": "`t0`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 0.1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 100,
                          "cost": 10099.6,
                          "chosen": true
                        }
                      ]
                    },
                    "condition_filtering_pct": 100,
                    "rows_for_plan": 100000,
                    "cost_for_plan": 10200.9,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t2`",
                          "`t0`"
                        ],
                        "table": "`t1`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "access_type": "ref",
                              "index": "i1",
                              "rows": 31.25,
                              "cost": 687500,
                              "chosen": true
                            },
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 16,
                              "resulting_rows": 1000,
                              "cost": 1e+07,
                              "chosen": false
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 312500,
                        "cost_for_plan": 697701,
                        "pruned_by_cost": true
                      }
                    ]
                  }
                ]
              },
              {
                "plan_prefix": [
                ],
                "table": "`t1`",
                "best_access_path": {
                  "considered_access_paths": [
                    {
                      "access_type": "ref",
                      "index": "i1",
                      "usable": false,
                      "chosen": false
                    },
                    {
                      "rows_to_scan": 1000,
                      "filtering_effect": [
                      ],
                      "final_filtering_effect": 1,
                      "access_type": "scan",
                      "resulting_rows": 1000,
                      "cost": 101.25,
                      "chosen": true
                    }
                  ]
                },
                "condition_filtering_pct": 100,
                "rows_for_plan": 1000,
                "cost_for_plan": 101.25,
                "rest_of_plan": [
                  {
                    "plan_prefix": [
                      "`t1`"
                    ],
                    "table": "`t2`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 1000,
                          "cost": 100001,
                          "chosen": true
                        }
                      ]
                    },
                    "condition_filtering_pct": 10,
                    "rows_for_plan": 100000,
                    "cost_for_plan": 100103,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t1`",
                          "`t2`"
                        ],
                        "table": "`t0`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 0.1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 16,
                              "resulting_rows": 100,
                              "cost": 1.00148e+06,
                              "chosen": true
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 1e+06,
                        "cost_for_plan": 1.10159e+06,
                        "pruned_by_cost": true
                      }
                    ]
                  },
                  {
                    "plan_prefix": [
                      "`t1`"
                    ],
                    "table": "`t0`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 0.1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 100,
                          "cost": 10096.8,
                          "chosen": true
                        }
                      ]
                    },
                    "condition_filtering_pct": 10,
                    "rows_for_plan": 10000,
                    "cost_for_plan": 10198.1,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t1`",
                          "`t0`"
                        ],
                        "table": "`t2`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 2,
                              "resulting_rows": 1000,
                              "cost": 1e+06,
                              "chosen": true
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 1e+06,
                        "cost_for_plan": 1.0102e+06,
                        "pruned_by_cost": true
                      }
                    ]
                  }
                ]
              },
              {
                "plan_prefix": [
                ],
                "table": "`t0`",
                "best_access_path": {
                  "considered_access_paths": [
                    {
                      "rows_to_scan": 1000,
                      "filtering_effect": [
                      ],
                      "final_filtering_effect": 0.1,
                      "access_type": "scan",
                      "resulting_rows": 100,
                      "cost": 101.25,
                      "chosen": true
                    }
                  ]
                },
                "condition_filtering_pct": 100,
                "rows_for_plan": 100,
                "cost_for_plan": 101.25,
                "rest_of_plan": [
                  {
                    "plan_prefix": [
                      "`t0`"
                    ],
                    "table": "`t2`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 1000,
                          "cost": 10001.3,
                          "chosen": true
                        }
                      ]
                    },
                    "condition_filtering_pct": 100,
                    "rows_for_plan": 100000,
                    "cost_for_plan": 10102.5,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t0`",
                          "`t2`"
                        ],
                        "table": "`t1`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "access_type": "ref",
                              "index": "i1",
                              "rows": 31.25,
                              "cost": 687500,
                              "chosen": true
                            },
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 16,
                              "resulting_rows": 1000,
                              "cost": 1e+07,
                              "chosen": false
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 312500,
                        "cost_for_plan": 697603,
                        "pruned_by_cost": true
                      }
                    ]
                  },
                  {
                    "plan_prefix": [
                      "`t0`"
                    ],
                    "table": "`t1`",
                    "best_access_path": {
                      "considered_access_paths": [
                        {
                          "access_type": "ref",
                          "index": "i1",
                          "usable": false,
                          "chosen": false
                        },
                        {
                          "rows_to_scan": 1000,
                          "filtering_effect": [
                          ],
                          "final_filtering_effect": 1,
                          "access_type": "scan",
                          "using_join_cache": true,
                          "buffers_needed": 1,
                          "resulting_rows": 1000,
                          "cost": 10001.3,
                          "chosen": true
                        }
                      ]
                    },
                    "condition_filtering_pct": 10,
                    "rows_for_plan": 10000,
                    "cost_for_plan": 10102.5,
                    "rest_of_plan": [
                      {
                        "plan_prefix": [
                          "`t0`",
                          "`t1`"
                        ],
                        "table": "`t2`",
                        "best_access_path": {
                          "considered_access_paths": [
                            {
                              "rows_to_scan": 1000,
                              "filtering_effect": [
                              ],
                              "final_filtering_effect": 1,
                              "access_type": "scan",
                              "using_join_cache": true,
                              "buffers_needed": 2,
                              "resulting_rows": 1000,
                              "cost": 1e+06,
                              "chosen": true
                            }
                          ]
                        },
                        "condition_filtering_pct": 10,
                        "rows_for_plan": 1e+06,
                        "cost_for_plan": 1.01011e+06,
                        "pruned_by_cost": true
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "attaching_conditions_to_tables": {
              "original_condition": "((`t1`.`c0` = `t2`.`c1`) and (`t0`.`c2` = `t1`.`c2`) and (`t1`.`c2` = 1000))",
              "attached_conditions_computation": [
              ],
              "attached_conditions_summary": [
                {
                  "table": "`t2`",
                  "attached": null
                },
                {
                  "table": "`t1`",
                  "attached": "((`t1`.`c0` = `t2`.`c1`) and (`t1`.`c2` = 1000))"
                },
                {
                  "table": "`t0`",
                  "attached": "(`t0`.`c2` = `t1`.`c2`)"
                }
              ]
            }
          },
          {
            "optimizing_distinct_group_by_order_by": {
              "simplifying_order_by": {
                "original_clause": "`t2`.`c0` desc",
                "items": [
                  {
                    "item": "`t2`.`c0`"
                  }
                ],
                "resulting_clause_is_simple": true,
                "resulting_clause": "`t2`.`c0` desc"
              }
            }
          },
          {
            "finalizing_table_conditions": [
              {
                "table": "`t1`",
                "original_table_condition": "((`t1`.`c0` = `t2`.`c1`) and (`t1`.`c2` = 1000))",
                "final_table_condition   ": "(`t1`.`c2` = 1000)"
              },
              {
                "table": "`t0`",
                "original_table_condition": "(`t0`.`c2` = `t1`.`c2`)",
                "final_table_condition   ": "(`t0`.`c2` = `t1`.`c2`)"
              }
            ]
          },
          {
            "refine_plan": [
              {
                "table": "`t2`"
              },
              {
                "table": "`t1`"
              },
              {
                "table": "`t0`"
              }
            ]
          },
          {
            "considering_tmp_tables": [
              {
                "adding_tmp_table_in_plan_at_position": 3,
                "write_method": "write_all_rows"
              },
              {
                "adding_sort_to_table": ""
              }
            ]
          }
        ]
      }
    }
  ]
} |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------+
| marker                    |
+---------------------------+
| CASE_5_MINIMAL_PLAIN_JOIN |
+---------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t1`.`c0` = `optimizer_join_filter_repro`.`t2`.`c1`) and (`optimizer_join_filter_repro`.`t0`.`c2` = `optimizer_join_filter_repro`.`t1`.`c2`) and (`optimizer_join_filter_repro`.`t1`.`c2` = 1000))",
  "query_plan": {
    "inputs": [
      {
        "operation": "Table scan on t0",
        "table_name": "t0",
        "access_type": "table",
        "schema_name": "optimizer_join_filter_repro",
        "used_columns": [
          "c0",
          "c2"
        ],
        "estimated_rows": 1000.0,
        "estimated_total_cost": 0.014090915522496968
      },
      {
        "inputs": [
          {
            "operation": "Table scan on t2",
            "table_name": "t2",
            "access_type": "table",
            "schema_name": "optimizer_join_filter_repro",
            "used_columns": [
              "c0",
              "c1"
            ],
            "estimated_rows": 1000.0,
            "estimated_total_cost": 101.25
          },
          {
            "inputs": [
              {
                "covering": false,
                "operation": "Index lookup on t1 using i1 (c0 = t2.c1)",
                "index_name": "i1",
                "table_name": "t1",
                "access_type": "index",
                "key_columns": [
                  "c0"
                ],
                "schema_name": "optimizer_join_filter_repro",
                "used_columns": [
                  "c0",
                  "c2"
                ],
                "estimated_rows": 31.25,
                "lookup_condition": "c0 = t2.c1",
                "index_access_type": "index_lookup",
                "lookup_references": [
                  "optimizer_join_filter_repro.t2.c1"
                ],
                "estimated_total_cost": 3.753125
              }
            ],
            "condition": "(t1.c2 = 1000)",
            "operation": "Filter: (t1.c2 = 1000)",
            "access_type": "filter",
            "estimated_rows": 31.25,
            "filter_columns": [
              "optimizer_join_filter_repro.t1.c2"
            ],
            "estimated_total_cost": 3.753125
          }
        ],
        "heading": "Hash",
        "join_type": "inner join",
        "operation": "Nested loop inner join",
        "access_type": "join",
        "estimated_rows": 31250.0,
        "join_algorithm": "nested_loop",
        "estimated_total_cost": 6976.25
      }
    ],
    "join_type": "inner join",
    "operation": "Inner hash join (t0.c2 = t1.c2)",
    "access_type": "join",
    "join_columns": [
      "optimizer_join_filter_repro.t0.c2",
      "optimizer_join_filter_repro.t1.c2"
    ],
    "estimated_rows": 312500.02211891115,
    "hash_condition": [
      "(t0.c2 = t1.c2)"
    ],
    "join_algorithm": "hash",
    "estimated_total_cost": 3132415.5911247707
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=312500) (actual time=109..109 rows=0 loops=1)
    -> Table scan on t0  (cost=0.0141 rows=1000) (never executed)
    -> Hash
        -> Nested loop inner join  (cost=6976 rows=31250) (actual time=109..109 rows=0 loops=1)
            -> Table scan on t2  (cost=101 rows=1000) (actual time=0.0091..0.479 rows=1000 loops=1)
            -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.108..0.108 rows=0 loops=1000)
                -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00198..0.104 rows=85.8 loops=1000)
 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t2.c1 = t1.c0)  (cost=1.01e+6 rows=1e+6) (actual time=0.468..0.468 rows=0 loops=1)
    -> Table scan on t2  (cost=0.00128 rows=1000) (never executed)
    -> Hash
        -> Inner hash join (t1.c2 = t0.c2)  (cost=10103 rows=10000) (actual time=0.466..0.466 rows=0 loops=1)
            -> Table scan on t1  (cost=0.113 rows=1000) (never executed)
            -> Hash
                -> Filter: (t0.c2 = 1000)  (cost=101 rows=100) (actual time=0.464..0.464 rows=0 loops=1)
                    -> Table scan on t0  (cost=101 rows=1000) (actual time=0.00856..0.418 rows=1000 loops=1)
 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------+
| marker                   |
+--------------------------+
| CASE_6_FANOUT_FILTER_OFF |
+--------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1`,`optimizer_join_filter_repro`.`t2`.`c2` AS `ref2` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t1`.`c0` = `optimizer_join_filter_repro`.`t2`.`c1`) and (`optimizer_join_filter_repro`.`t0`.`c2` = `optimizer_join_filter_repro`.`t1`.`c2`) and (`optimizer_join_filter_repro`.`t1`.`c2` = 1000)) order by `optimizer_join_filter_repro`.`t2`.`c0` desc limit 3",
  "query_plan": {
    "limit": 3,
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "inputs": [
                  {
                    "operation": "Table scan on t0",
                    "table_name": "t0",
                    "access_type": "table",
                    "schema_name": "optimizer_join_filter_repro",
                    "used_columns": [
                      "c0",
                      "c2"
                    ],
                    "estimated_rows": 1000.0,
                    "estimated_total_cost": 0.00343073486328125
                  },
                  {
                    "inputs": [
                      {
                        "operation": "Table scan on t2",
                        "table_name": "t2",
                        "access_type": "table",
                        "schema_name": "optimizer_join_filter_repro",
                        "used_columns": [
                          "c0",
                          "c1",
                          "c2"
                        ],
                        "estimated_rows": 1000.0,
                        "estimated_total_cost": 101.25
                      },
                      {
                        "inputs": [
                          {
                            "covering": false,
                            "operation": "Index lookup on t1 using i1 (c0 = t2.c1)",
                            "index_name": "i1",
                            "table_name": "t1",
                            "access_type": "index",
                            "key_columns": [
                              "c0"
                            ],
                            "schema_name": "optimizer_join_filter_repro",
                            "used_columns": [
                              "c0",
                              "c2"
                            ],
                            "estimated_rows": 31.25,
                            "lookup_condition": "c0 = t2.c1",
                            "index_access_type": "index_lookup",
                            "lookup_references": [
                              "optimizer_join_filter_repro.t2.c1"
                            ],
                            "estimated_total_cost": 3.753125
                          }
                        ],
                        "condition": "(t1.c2 = 1000)",
                        "operation": "Filter: (t1.c2 = 1000)",
                        "access_type": "filter",
                        "estimated_rows": 31.25,
                        "filter_columns": [
                          "optimizer_join_filter_repro.t1.c2"
                        ],
                        "estimated_total_cost": 3.753125
                      }
                    ],
                    "heading": "Hash",
                    "join_type": "inner join",
                    "operation": "Nested loop inner join",
                    "access_type": "join",
                    "estimated_rows": 31250.0,
                    "join_algorithm": "nested_loop",
                    "estimated_total_cost": 6976.25
                  }
                ],
                "join_type": "inner join",
                "operation": "Inner hash join (t0.c2 = t1.c2)",
                "access_type": "join",
                "join_columns": [
                  "optimizer_join_filter_repro.t0.c2",
                  "optimizer_join_filter_repro.t1.c2"
                ],
                "estimated_rows": 31250000.0,
                "hash_condition": [
                  "(t0.c2 = t1.c2)"
                ],
                "join_algorithm": "hash",
                "estimated_total_cost": 3131983.4604644775
              }
            ],
            "operation": "Stream results",
            "access_type": "stream",
            "estimated_rows": 31250000.0,
            "estimated_total_cost": 3131983.4604644775
          }
        ],
        "operation": "Sort: t2.c0 DESC, limit input to 3 row(s) per chunk",
        "access_type": "sort",
        "sort_fields": [
          "t2.c0 DESC"
        ],
        "per_chunk_limit": 3
      }
    ],
    "operation": "Limit: 3 row(s)",
    "access_type": "limit",
    "limit_offset": 0
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Limit: 3 row(s)  (actual time=109..109 rows=0 loops=1)
    -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (actual time=109..109 rows=0 loops=1)
        -> Stream results  (cost=3.13e+6 rows=31.2e+6) (actual time=109..109 rows=0 loops=1)
            -> Inner hash join (t0.c2 = t1.c2)  (cost=3.13e+6 rows=31.2e+6) (actual time=109..109 rows=0 loops=1)
                -> Table scan on t0  (cost=0.00343 rows=1000) (never executed)
                -> Hash
                    -> Nested loop inner join  (cost=6976 rows=31250) (actual time=109..109 rows=0 loops=1)
                        -> Table scan on t2  (cost=101 rows=1000) (actual time=0.00718..0.521 rows=1000 loops=1)
                        -> Filter: (t1.c2 = 1000)  (cost=3.75 rows=31.2) (actual time=0.108..0.108 rows=0 loops=1000)
                            -> Index lookup on t1 using i1 (c0 = t2.c1)  (cost=3.75 rows=31.2) (actual time=0.00197..0.104 rows=85.8 loops=1000)
 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------+
| marker            |
+-------------------+
| CASE_7_HYPERGRAPH |
+-------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `optimizer_join_filter_repro`.`t2`.`c0` AS `ref0`,`optimizer_join_filter_repro`.`t0`.`c0` AS `ref1`,`optimizer_join_filter_repro`.`t2`.`c2` AS `ref2` from `optimizer_join_filter_repro`.`t2` join `optimizer_join_filter_repro`.`t1` join `optimizer_join_filter_repro`.`t0` where ((`optimizer_join_filter_repro`.`t0`.`c2` = 1000) and (`optimizer_join_filter_repro`.`t1`.`c2` = `optimizer_join_filter_repro`.`t0`.`c2`) and (`optimizer_join_filter_repro`.`t2`.`c1` = `optimizer_join_filter_repro`.`t1`.`c0`)) order by `optimizer_join_filter_repro`.`t2`.`c0` desc limit 3",
  "query_plan": {
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "operation": "Table scan on t1",
                "table_name": "t1",
                "access_type": "table",
                "schema_name": "optimizer_join_filter_repro",
                "used_columns": [
                  "c0",
                  "c2"
                ],
                "estimated_rows": 1000.0,
                "estimated_total_cost": 377.8801843317972,
                "estimated_first_row_cost": 0.3778801843317972
              },
              {
                "inputs": [
                  {
                    "operation": "Table scan on t0",
                    "table_name": "t0",
                    "access_type": "table",
                    "schema_name": "optimizer_join_filter_repro",
                    "used_columns": [
                      "c0",
                      "c2"
                    ],
                    "estimated_rows": 1000.0,
                    "estimated_total_cost": 377.8801843317972,
                    "estimated_first_row_cost": 0.3778801843317972
                  }
                ],
                "heading": "Hash",
                "condition": "(t0.c2 = 1000)",
                "operation": "Filter: (t0.c2 = 1000)",
                "access_type": "filter",
                "estimated_rows": 100.00000149011612,
                "filter_columns": [
                  "optimizer_join_filter_repro.t0.c2"
                ],
                "estimated_total_cost": 435.4838709677419,
                "estimated_first_row_cost": 4.354838644785266
              }
            ],
            "join_type": "inner join",
            "operation": "Inner hash join (t1.c2 = t0.c2)",
            "access_type": "join",
            "join_columns": [
              "optimizer_join_filter_repro.t0.c2",
              "optimizer_join_filter_repro.t1.c2"
            ],
            "estimated_rows": 10000.000298023226,
            "hash_condition": [
              "(t1.c2 = t0.c2)"
            ],
            "join_algorithm": "hash",
            "estimated_total_cost": 1217.0470121450687,
            "estimated_first_row_cost": 469.3982751571025
          },
          {
            "heading": "Hash",
            "operation": "Table scan on t2",
            "table_name": "t2",
            "access_type": "table",
            "schema_name": "optimizer_join_filter_repro",
            "used_columns": [
              "c0",
              "c1",
              "c2"
            ],
            "estimated_rows": 1000.0,
            "estimated_total_cost": 442.39631336405535,
            "estimated_first_row_cost": 0.4423963133640553
          }
        ],
        "join_type": "inner join",
        "operation": "Inner hash join (t2.c1 = t1.c0)",
        "access_type": "join",
        "join_columns": [
          "optimizer_join_filter_repro.t1.c0",
          "optimizer_join_filter_repro.t2.c1"
        ],
        "estimated_rows": 312500.0093132258,
        "hash_condition": [
          "(t2.c1 = t1.c0)"
        ],
        "join_algorithm": "hash",
        "estimated_total_cost": 10847.62561680473,
        "estimated_first_row_cost": 1253.4463701779337
      }
    ],
    "operation": "Sort: t2.c0 DESC, limit input to 3 row(s) per chunk",
    "access_type": "sort",
    "sort_fields": [
      "t2.c0 DESC"
    ],
    "estimated_rows": 3.0,
    "per_chunk_limit": 3,
    "estimated_total_cost": 118854.6946615257,
    "estimated_first_row_cost": 118854.6946615257
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Sort: t2.c0 DESC, limit input to 3 row(s) per chunk  (cost=118855..118855 rows=3) (actual time=1.02..1.02 rows=0 loops=1)
    -> Inner hash join (t2.c1 = t1.c0)  (cost=1253..10848 rows=312500) (actual time=1.02..1.02 rows=0 loops=1)
        -> Inner hash join (t1.c2 = t0.c2)  (cost=469..1217 rows=10000) (actual time=0.45..0.45 rows=0 loops=1)
            -> Table scan on t1  (cost=0.378..378 rows=1000) (actual time=0.00251..0.00251 rows=1 loops=1)
            -> Hash
                -> Filter: (t0.c2 = 1000)  (cost=4.35..435 rows=100) (actual time=0.445..0.445 rows=0 loops=1)
                    -> Table scan on t0  (cost=0.378..378 rows=1000) (actual time=0.00283..0.398 rows=1000 loops=1)
        -> Hash
            -> Table scan on t2  (cost=0.442..442 rows=1000) (actual time=0.00906..0.453 rows=1000 loops=1)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------+
| marker            |
+-------------------+
| REPRODUCTION_DONE |
+-------------------+
