mysql: [Warning] Using a password on the command line interface can be insecure.
+--------------------+
| section            |
+--------------------+
| PARAMETER SNAPSHOT |
+--------------------+
+---------------+------------------------------+----------------------------------------+
| mysql_version | optimizer_prune_level_before | information_schema_stats_expiry_before |
+---------------+------------------------------+----------------------------------------+
| 9.7.1         |                            1 |                                  86400 |
+---------------+------------------------------+----------------------------------------+
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name    | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| optimizer_switch | 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 |
+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------+
| section                              |
+--------------------------------------+
| PARAMETER SNAPSHOT AFTER SETUP KNOBS |
+--------------------------------------+
+-----------------------+---------------------------------+
| optimizer_prune_level | information_schema_stats_expiry |
+-----------------------+---------------------------------+
|                     0 |                               0 |
+-----------------------+---------------------------------+
+--------------------------+---------+----------+----------+
| Table                    | Op      | Msg_type | Msg_text |
+--------------------------+---------+----------+----------+
| mysql_bug_62859_final.t0 | analyze | status   | OK       |
| mysql_bug_62859_final.t1 | analyze | status   | OK       |
| mysql_bug_62859_final.t3 | analyze | status   | OK       |
+--------------------------+---------+----------+----------+
+---------------------------------+
| section                         |
+---------------------------------+
| SANITY CHECKS BEFORE HISTOGRAMS |
+---------------------------------+
+------------+---------+---------+---------+
| check_name | t0_rows | t1_rows | t3_rows |
+------------+---------+---------+---------+
| row-counts |  300006 | 1000006 |   20003 |
+------------+---------+---------+---------+
+------------+------------------+-----------+-----------+-----------+
| check_name | t0_c3_prefix_ndv | t1_c0_ndv | t3_c0_ndv | t3_c3_ndv |
+------------+------------------+-----------+-----------+-----------+
| ndv-check  |            17576 |         4 |     20003 |         4 |
+------------+------------------+-----------+-----------+-----------+
+-------------+---------------+---------------+-------------------+
| check_name  | t1_t3_matches | t3_t0_matches | final_result_rows |
+-------------+---------------+---------------+-------------------+
| join-counts |             6 |             6 |                12 |
+-------------+---------------+---------------+-------------------+
+--------------------------------------------+
| section                                    |
+--------------------------------------------+
| BASE EXPLAIN FORMAT=JSON BEFORE HISTOGRAMS |
+--------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `mysql_bug_62859_final`.`t0`.`c4` AS `ref0`,`mysql_bug_62859_final`.`t0`.`c3` AS `ref1` from `mysql_bug_62859_final`.`t3` join `mysql_bug_62859_final`.`t0` join `mysql_bug_62859_final`.`t1` where ((`mysql_bug_62859_final`.`t0`.`c3` = `mysql_bug_62859_final`.`t3`.`c3`) and (`mysql_bug_62859_final`.`t3`.`c0` = `mysql_bug_62859_final`.`t1`.`c0`) and (`mysql_bug_62859_final`.`t3`.`c1` >= -2066281069))",
  "query_plan": {
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "covering": true,
                "operation": "Covering index scan on t1 using i2",
                "index_name": "i2",
                "table_name": "t1",
                "access_type": "index",
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0"
                ],
                "estimated_rows": 996948.0,
                "index_access_type": "index_scan",
                "estimated_total_cost": 101148.1295211792
              }
            ],
            "condition": "(t1.c0 is not null)",
            "operation": "Filter: (t1.c0 is not null)",
            "access_type": "filter",
            "estimated_rows": 996948.0,
            "filter_columns": [
              "mysql_bug_62859_final.t1.c0"
            ],
            "estimated_total_cost": 101148.1295211792
          },
          {
            "inputs": [
              {
                "covering": false,
                "operation": "Index lookup on t3 using i5 (c0 = t1.c0)",
                "index_name": "i5",
                "table_name": "t3",
                "access_type": "index",
                "key_columns": [
                  "c0"
                ],
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0",
                  "c1",
                  "c3"
                ],
                "estimated_rows": 1.005399227142334,
                "lookup_condition": "c0 = t1.c0",
                "index_access_type": "index_lookup",
                "lookup_references": [
                  "mysql_bug_62859_final.t1.c0"
                ],
                "estimated_total_cost": 0.25134984039812464
              }
            ],
            "condition": "((t3.c1 >= -2066281069) and (t3.c3 is not null))",
            "operation": "Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))",
            "access_type": "filter",
            "estimated_rows": 0.3350995568453641,
            "filter_columns": [
              "mysql_bug_62859_final.t3.c1",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 0.25134984039812464
          }
        ],
        "join_type": "inner join",
        "operation": "Nested loop inner join",
        "access_type": "join",
        "estimated_rows": 334076.832997872,
        "join_algorithm": "nested_loop",
        "estimated_total_cost": 451963.89156656264
      },
      {
        "inputs": [
          {
            "covering": false,
            "operation": "Index lookup on t0 using i7 (c3 = t3.c3)",
            "index_name": "i7",
            "table_name": "t0",
            "access_type": "index",
            "key_columns": [
              "c3"
            ],
            "schema_name": "mysql_bug_62859_final",
            "used_columns": [
              "c3",
              "c4"
            ],
            "estimated_rows": 17.110595703125,
            "lookup_condition": "c3 = t3.c3",
            "index_access_type": "index_lookup",
            "lookup_references": [
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 4.3982762279381715
          }
        ],
        "condition": "(t0.c3 = t3.c3)",
        "operation": "Filter: (t0.c3 = t3.c3)",
        "access_type": "filter",
        "estimated_rows": 17.110595703125,
        "filter_columns": [
          "mysql_bug_62859_final.t0.c3",
          "mysql_bug_62859_final.t3.c3"
        ],
        "estimated_total_cost": 4.3982762279381715
      }
    ],
    "join_type": "inner join",
    "operation": "Nested loop inner join",
    "access_type": "join",
    "estimated_rows": 5716253.623206997,
    "join_algorithm": "nested_loop",
    "estimated_total_cost": 2492949.7357071033
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------+
| section                                      |
+----------------------------------------------+
| HINTED EXPLAIN FORMAT=JSON BEFORE HISTOGRAMS |
+----------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select /*+ JOIN_ORDER(@`select#1` `t3`,`t0`,`t1`) */ `mysql_bug_62859_final`.`t0`.`c4` AS `ref0`,`mysql_bug_62859_final`.`t0`.`c3` AS `ref1` from `mysql_bug_62859_final`.`t3` join `mysql_bug_62859_final`.`t0` join `mysql_bug_62859_final`.`t1` where ((`mysql_bug_62859_final`.`t0`.`c3` = `mysql_bug_62859_final`.`t3`.`c3`) and (`mysql_bug_62859_final`.`t1`.`c0` = `mysql_bug_62859_final`.`t3`.`c0`) and (`mysql_bug_62859_final`.`t3`.`c1` >= -2066281069))",
  "query_plan": {
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "operation": "Table scan on t3",
                "table_name": "t3",
                "access_type": "table",
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0",
                  "c1",
                  "c3"
                ],
                "estimated_rows": 20111.0,
                "estimated_total_cost": 2035.35
              }
            ],
            "condition": "((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))",
            "operation": "Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))",
            "access_type": "filter",
            "estimated_rows": 6702.996188759804,
            "filter_columns": [
              "mysql_bug_62859_final.t3.c0",
              "mysql_bug_62859_final.t3.c1",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 2035.35
          },
          {
            "inputs": [
              {
                "covering": false,
                "operation": "Index lookup on t0 using i7 (c3 = t3.c3)",
                "index_name": "i7",
                "table_name": "t0",
                "access_type": "index",
                "key_columns": [
                  "c3"
                ],
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c3",
                  "c4"
                ],
                "estimated_rows": 17.110595703125,
                "lookup_condition": "c3 = t3.c3",
                "index_access_type": "index_lookup",
                "lookup_references": [
                  "mysql_bug_62859_final.t3.c3"
                ],
                "estimated_total_cost": 4.398526374055108
              }
            ],
            "condition": "(t0.c3 = t3.c3)",
            "operation": "Filter: (t0.c3 = t3.c3)",
            "access_type": "filter",
            "estimated_rows": 17.110595703125,
            "filter_columns": [
              "mysql_bug_62859_final.t0.c3",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 4.398526374055108
          }
        ],
        "join_type": "inner join",
        "operation": "Nested loop inner join",
        "access_type": "join",
        "estimated_rows": 114692.25778545675,
        "join_algorithm": "nested_loop",
        "estimated_total_cost": 42986.17024042623
      },
      {
        "covering": true,
        "operation": "Covering index lookup on t1 using i2 (c0 = t3.c0)",
        "index_name": "i2",
        "table_name": "t1",
        "access_type": "index",
        "key_columns": [
          "c0"
        ],
        "schema_name": "mysql_bug_62859_final",
        "used_columns": [
          "c0"
        ],
        "estimated_rows": 332316.0,
        "lookup_condition": "c0 = t3.c0",
        "index_access_type": "index_lookup",
        "lookup_references": [
          "mysql_bug_62859_final.t3.c0"
        ],
        "estimated_total_cost": 608.4512421069057
      }
    ],
    "join_type": "inner join",
    "operation": "Nested loop inner join",
    "access_type": "join",
    "estimated_rows": 38114072338.23184,
    "join_algorithm": "nested_loop",
    "estimated_total_cost": 3881201635.1030316
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------+
| section                                |
+----------------------------------------+
| BASE EXPLAIN ANALYZE BEFORE HISTOGRAMS |
+----------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=2.49e+6 rows=5.72e+6) (actual time=1735..1735 rows=12 loops=1)
    -> Nested loop inner join  (cost=451964 rows=334077) (actual time=1735..1735 rows=6 loops=1)
        -> Filter: (t1.c0 is not null)  (cost=101148 rows=996948) (actual time=0.0118..473 rows=1e+6 loops=1)
            -> Covering index scan on t1 using i2  (cost=101148 rows=996948) (actual time=0.0111..409 rows=1e+6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))  (cost=0.251 rows=0.335) (actual time=0.00117..0.00117 rows=6e-6 loops=1e+6)
            -> Index lookup on t3 using i5 (c0 = t1.c0)  (cost=0.251 rows=1.01) (actual time=0.00103..0.00103 rows=6e-6 loops=1e+6)
    -> Filter: (t0.c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.0107..0.0512 rows=2 loops=6)
        -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.00599..0.0476 rows=23 loops=6)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------+
| section                                  |
+------------------------------------------+
| HINTED EXPLAIN ANALYZE BEFORE HISTOGRAMS |
+------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=3.88e+9 rows=38.1e+9) (actual time=62.4..62.6 rows=12 loops=1)
    -> Nested loop inner join  (cost=42986 rows=114692) (actual time=62.4..62.5 rows=6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))  (cost=2035 rows=6703) (actual time=0.00817..12.4 rows=20003 loops=1)
            -> Table scan on t3  (cost=2035 rows=20111) (actual time=0.00712..10.1 rows=20003 loops=1)
        -> Filter: (t0.c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.00241..0.00242 rows=300e-6 loops=20003)
            -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.00228..0.00229 rows=0.00345 loops=20003)
    -> Covering index lookup on t1 using i2 (c0 = t3.c0)  (cost=608 rows=332316) (actual time=0.00303..0.00399 rows=2 loops=6)
 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------+
| section                              |
+--------------------------------------+
| BASE DIRECT TIMING BEFORE HISTOGRAMS |
+--------------------------------------+
+------------+---------------+
| ref0       | ref1          |
+------------+---------------+
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
+------------+---------------+
+------------------------------------------+
| base_direct_elapsed_ms_before_histograms |
+------------------------------------------+
|                                1371.7830 |
+------------------------------------------+
+----------------------------------------+
| section                                |
+----------------------------------------+
| HINTED DIRECT TIMING BEFORE HISTOGRAMS |
+----------------------------------------+
+------------+---------------+
| ref0       | ref1          |
+------------+---------------+
| 2000000001 | match_key_000 |
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000003 | match_key_001 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000005 | match_key_002 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
| 2000000004 | match_key_002 |
+------------+---------------+
+--------------------------------------------+
| hinted_direct_elapsed_ms_before_histograms |
+--------------------------------------------+
|                                    52.1690 |
+--------------------------------------------+
+------------------------------------------------------------------------+
| section                                                                |
+------------------------------------------------------------------------+
| FORCED SUSPECTED DEFAULT ORDER BEFORE HISTOGRAMS: JOIN_ORDER(t1,t3,t0) |
+------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=2.49e+6 rows=5.72e+6) (actual time=1737..1738 rows=12 loops=1)
    -> Nested loop inner join  (cost=451964 rows=334077) (actual time=1737..1737 rows=6 loops=1)
        -> Filter: (t1.c0 is not null)  (cost=101148 rows=996948) (actual time=0.0119..481 rows=1e+6 loops=1)
            -> Covering index scan on t1 using i2  (cost=101148 rows=996948) (actual time=0.0109..413 rows=1e+6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))  (cost=0.251 rows=0.335) (actual time=0.00117..0.00117 rows=6e-6 loops=1e+6)
            -> Index lookup on t3 using i5 (c0 = t1.c0)  (cost=0.251 rows=1.01) (actual time=0.00103..0.00103 rows=6e-6 loops=1e+6)
    -> Filter: (t0.c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.0111..0.0518 rows=2 loops=6)
        -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.4 rows=17.1) (actual time=0.00643..0.0481 rows=23 loops=6)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------+
| section           |
+-------------------+
| CREATE HISTOGRAMS |
+-------------------+
+--------------------------+-----------+----------+-----------------------------------------------+
| Table                    | Op        | Msg_type | Msg_text                                      |
+--------------------------+-----------+----------+-----------------------------------------------+
| mysql_bug_62859_final.t1 | histogram | status   | Histogram statistics created for column 'c0'. |
+--------------------------+-----------+----------+-----------------------------------------------+
+--------------------------+-----------+----------+-----------------------------------------------+
| Table                    | Op        | Msg_type | Msg_text                                      |
+--------------------------+-----------+----------+-----------------------------------------------+
| mysql_bug_62859_final.t3 | histogram | status   | Histogram statistics created for column 'c0'. |
| mysql_bug_62859_final.t3 | histogram | status   | Histogram statistics created for column 'c3'. |
+--------------------------+-----------+----------+-----------------------------------------------+
+--------------------------+-----------+----------+-----------------------------------------------+
| Table                    | Op        | Msg_type | Msg_text                                      |
+--------------------------+-----------+----------+-----------------------------------------------+
| mysql_bug_62859_final.t0 | histogram | status   | Histogram statistics created for column 'c3'. |
+--------------------------+-----------+----------+-----------------------------------------------+
+--------------------------+---------+----------+----------+
| Table                    | Op      | Msg_type | Msg_text |
+--------------------------+---------+----------+----------+
| mysql_bug_62859_final.t0 | analyze | status   | OK       |
| mysql_bug_62859_final.t1 | analyze | status   | OK       |
| mysql_bug_62859_final.t3 | analyze | status   | OK       |
+--------------------------+---------+----------+----------+
+--------------------------------+
| section                        |
+--------------------------------+
| SANITY CHECKS AFTER HISTOGRAMS |
+--------------------------------+
+------------+---------+---------+---------+
| check_name | t0_rows | t1_rows | t3_rows |
+------------+---------+---------+---------+
| row-counts |  300006 | 1000006 |   20003 |
+------------+---------+---------+---------+
+-------------+---------------+---------------+-------------------+
| check_name  | t1_t3_matches | t3_t0_matches | final_result_rows |
+-------------+---------------+---------------+-------------------+
| join-counts |             6 |             6 |                12 |
+-------------+---------------+---------------+-------------------+
+-------------------------------------------+
| section                                   |
+-------------------------------------------+
| BASE EXPLAIN FORMAT=JSON AFTER HISTOGRAMS |
+-------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select `mysql_bug_62859_final`.`t0`.`c4` AS `ref0`,`mysql_bug_62859_final`.`t0`.`c3` AS `ref1` from `mysql_bug_62859_final`.`t3` join `mysql_bug_62859_final`.`t0` join `mysql_bug_62859_final`.`t1` where ((`mysql_bug_62859_final`.`t0`.`c3` = `mysql_bug_62859_final`.`t3`.`c3`) and (`mysql_bug_62859_final`.`t3`.`c0` = `mysql_bug_62859_final`.`t1`.`c0`) and (`mysql_bug_62859_final`.`t3`.`c1` >= -2066281069))",
  "query_plan": {
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "covering": true,
                "operation": "Covering index scan on t1 using i2",
                "index_name": "i2",
                "table_name": "t1",
                "access_type": "index",
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0"
                ],
                "estimated_rows": 996948.0,
                "index_access_type": "index_scan",
                "estimated_total_cost": 101148.1295211792
              }
            ],
            "condition": "(t1.c0 is not null)",
            "operation": "Filter: (t1.c0 is not null)",
            "access_type": "filter",
            "estimated_rows": 996948.0,
            "filter_columns": [
              "mysql_bug_62859_final.t1.c0"
            ],
            "estimated_total_cost": 101148.1295211792
          },
          {
            "inputs": [
              {
                "covering": false,
                "operation": "Index lookup on t3 using i5 (c0 = t1.c0)",
                "index_name": "i5",
                "table_name": "t3",
                "access_type": "index",
                "key_columns": [
                  "c0"
                ],
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0",
                  "c1",
                  "c3"
                ],
                "estimated_rows": 1.005399227142334,
                "lookup_condition": "c0 = t1.c0",
                "index_access_type": "index_lookup",
                "lookup_references": [
                  "mysql_bug_62859_final.t1.c0"
                ],
                "estimated_total_cost": 0.25134984039812464
              }
            ],
            "condition": "((t3.c1 >= -2066281069) and (t3.c3 is not null))",
            "operation": "Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))",
            "access_type": "filter",
            "estimated_rows": 0.3350995568453641,
            "filter_columns": [
              "mysql_bug_62859_final.t3.c1",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 0.25134984039812464
          }
        ],
        "join_type": "inner join",
        "operation": "Nested loop inner join",
        "access_type": "join",
        "estimated_rows": 334076.832997872,
        "join_algorithm": "nested_loop",
        "estimated_total_cost": 451963.89156656264
      },
      {
        "inputs": [
          {
            "covering": false,
            "operation": "Index lookup on t0 using i7 (c3 = t3.c3)",
            "index_name": "i7",
            "table_name": "t0",
            "access_type": "index",
            "key_columns": [
              "c3"
            ],
            "schema_name": "mysql_bug_62859_final",
            "used_columns": [
              "c3",
              "c4"
            ],
            "estimated_rows": 16.95079803466797,
            "lookup_condition": "c3 = t3.c3",
            "index_access_type": "index_lookup",
            "lookup_references": [
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 4.357200259652266
          }
        ],
        "condition": "(t0.c3 = t3.c3)",
        "operation": "Filter: (t0.c3 = t3.c3)",
        "access_type": "filter",
        "estimated_rows": 16.95079803466797,
        "filter_columns": [
          "mysql_bug_62859_final.t0.c3",
          "mysql_bug_62859_final.t3.c3"
        ],
        "estimated_total_cost": 4.357200259652266
      }
    ],
    "join_type": "inner join",
    "operation": "Nested loop inner join",
    "access_type": "join",
    "estimated_rows": 5662868.924208429,
    "join_algorithm": "nested_loop",
    "estimated_total_cost": 2473888.752389737
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------------------------+
| section                                     |
+---------------------------------------------+
| HINTED EXPLAIN FORMAT=JSON AFTER HISTOGRAMS |
+---------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {
  "query": "/* select#1 */ select /*+ JOIN_ORDER(@`select#1` `t3`,`t0`,`t1`) */ `mysql_bug_62859_final`.`t0`.`c4` AS `ref0`,`mysql_bug_62859_final`.`t0`.`c3` AS `ref1` from `mysql_bug_62859_final`.`t3` join `mysql_bug_62859_final`.`t0` join `mysql_bug_62859_final`.`t1` where ((`mysql_bug_62859_final`.`t0`.`c3` = `mysql_bug_62859_final`.`t3`.`c3`) and (`mysql_bug_62859_final`.`t1`.`c0` = `mysql_bug_62859_final`.`t3`.`c0`) and (`mysql_bug_62859_final`.`t3`.`c1` >= -2066281069))",
  "query_plan": {
    "inputs": [
      {
        "inputs": [
          {
            "inputs": [
              {
                "operation": "Table scan on t3",
                "table_name": "t3",
                "access_type": "table",
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c0",
                  "c1",
                  "c3"
                ],
                "estimated_rows": 20111.0,
                "estimated_total_cost": 2035.35
              }
            ],
            "condition": "((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))",
            "operation": "Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))",
            "access_type": "filter",
            "estimated_rows": 6702.996188759804,
            "filter_columns": [
              "mysql_bug_62859_final.t3.c0",
              "mysql_bug_62859_final.t3.c1",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 2035.35
          },
          {
            "inputs": [
              {
                "covering": false,
                "operation": "Index lookup on t0 using i7 (c3 = t3.c3)",
                "index_name": "i7",
                "table_name": "t0",
                "access_type": "index",
                "key_columns": [
                  "c3"
                ],
                "schema_name": "mysql_bug_62859_final",
                "used_columns": [
                  "c3",
                  "c4"
                ],
                "estimated_rows": 16.95079803466797,
                "lookup_condition": "c3 = t3.c3",
                "index_access_type": "index_lookup",
                "lookup_references": [
                  "mysql_bug_62859_final.t3.c3"
                ],
                "estimated_total_cost": 4.357448069628081
              }
            ],
            "condition": "(t0.c3 = t3.c3)",
            "operation": "Filter: (t0.c3 = t3.c3)",
            "access_type": "filter",
            "estimated_rows": 16.95079803466797,
            "filter_columns": [
              "mysql_bug_62859_final.t0.c3",
              "mysql_bug_62859_final.t3.c3"
            ],
            "estimated_total_cost": 4.357448069628081
          }
        ],
        "join_type": "inner join",
        "operation": "Nested loop inner join",
        "access_type": "join",
        "estimated_rows": 113621.13462281656,
        "join_algorithm": "nested_loop",
        "estimated_total_cost": 42603.72618591398
      },
      {
        "covering": true,
        "operation": "Covering index lookup on t1 using i2 (c0 = t3.c0)",
        "index_name": "i2",
        "table_name": "t1",
        "access_type": "index",
        "key_columns": [
          "c0"
        ],
        "schema_name": "mysql_bug_62859_final",
        "used_columns": [
          "c0"
        ],
        "estimated_rows": 332316.0,
        "lookup_condition": "c0 = t3.c0",
        "index_access_type": "index_lookup",
        "lookup_references": [
          "mysql_bug_62859_final.t3.c0"
        ],
        "estimated_total_cost": 608.4539735832178
      }
    ],
    "join_type": "inner join",
    "operation": "Nested loop inner join",
    "access_type": "join",
    "estimated_rows": 37758120973.31591,
    "join_algorithm": "nested_loop",
    "estimated_total_cost": 3844954700.3020635
  },
  "query_type": "select",
  "json_schema_version": "2.0"
} |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------------------+
| section                               |
+---------------------------------------+
| BASE EXPLAIN ANALYZE AFTER HISTOGRAMS |
+---------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=2.47e+6 rows=5.66e+6) (actual time=1732..1732 rows=12 loops=1)
    -> Nested loop inner join  (cost=451964 rows=334077) (actual time=1732..1732 rows=6 loops=1)
        -> Filter: (t1.c0 is not null)  (cost=101148 rows=996948) (actual time=0.0119..475 rows=1e+6 loops=1)
            -> Covering index scan on t1 using i2  (cost=101148 rows=996948) (actual time=0.0111..409 rows=1e+6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))  (cost=0.251 rows=0.335) (actual time=0.00117..0.00117 rows=6e-6 loops=1e+6)
            -> Index lookup on t3 using i5 (c0 = t1.c0)  (cost=0.251 rows=1.01) (actual time=0.00103..0.00103 rows=6e-6 loops=1e+6)
    -> Filter: (t0.c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.0132..0.0546 rows=2 loops=6)
        -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.00699..0.0506 rows=23 loops=6)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------+
| section                                 |
+-----------------------------------------+
| HINTED EXPLAIN ANALYZE AFTER HISTOGRAMS |
+-----------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=3.84e+9 rows=37.8e+9) (actual time=60.6..60.8 rows=12 loops=1)
    -> Nested loop inner join  (cost=42604 rows=113621) (actual time=60.6..60.8 rows=6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null) and (t3.c0 is not null))  (cost=2035 rows=6703) (actual time=0.0111..12 rows=20003 loops=1)
            -> Table scan on t3  (cost=2035 rows=20111) (actual time=0.00955..9.86 rows=20003 loops=1)
        -> Filter: (t0.c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.00234..0.00235 rows=300e-6 loops=20003)
            -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.00221..0.00222 rows=0.00345 loops=20003)
    -> Covering index lookup on t1 using i2 (c0 = t3.c0)  (cost=608 rows=332316) (actual time=0.00276..0.00369 rows=2 loops=6)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------+
| section                             |
+-------------------------------------+
| BASE DIRECT TIMING AFTER HISTOGRAMS |
+-------------------------------------+
+------------+---------------+
| ref0       | ref1          |
+------------+---------------+
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
+------------+---------------+
+-----------------------------------------+
| base_direct_elapsed_ms_after_histograms |
+-----------------------------------------+
|                               1415.4350 |
+-----------------------------------------+
+---------------------------------------+
| section                               |
+---------------------------------------+
| HINTED DIRECT TIMING AFTER HISTOGRAMS |
+---------------------------------------+
+------------+---------------+
| ref0       | ref1          |
+------------+---------------+
| 2000000001 | match_key_000 |
| 2000000001 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000000 | match_key_000 |
| 2000000003 | match_key_001 |
| 2000000003 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000002 | match_key_001 |
| 2000000005 | match_key_002 |
| 2000000005 | match_key_002 |
| 2000000004 | match_key_002 |
| 2000000004 | match_key_002 |
+------------+---------------+
+-------------------------------------------+
| hinted_direct_elapsed_ms_after_histograms |
+-------------------------------------------+
|                                   54.6040 |
+-------------------------------------------+
+-----------------------------------------------------------------------+
| section                                                               |
+-----------------------------------------------------------------------+
| FORCED SUSPECTED DEFAULT ORDER AFTER HISTOGRAMS: JOIN_ORDER(t1,t3,t0) |
+-----------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=2.47e+6 rows=5.66e+6) (actual time=1722..1722 rows=12 loops=1)
    -> Nested loop inner join  (cost=451964 rows=334077) (actual time=1722..1722 rows=6 loops=1)
        -> Filter: (t1.c0 is not null)  (cost=101148 rows=996948) (actual time=0.00931..474 rows=1e+6 loops=1)
            -> Covering index scan on t1 using i2  (cost=101148 rows=996948) (actual time=0.00852..408 rows=1e+6 loops=1)
        -> Filter: ((t3.c1 >= -2066281069) and (t3.c3 is not null))  (cost=0.251 rows=0.335) (actual time=0.00116..0.00116 rows=6e-6 loops=1e+6)
            -> Index lookup on t3 using i5 (c0 = t1.c0)  (cost=0.251 rows=1.01) (actual time=0.00102..0.00102 rows=6e-6 loops=1e+6)
    -> Filter: (t0.c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.0108..0.0514 rows=2 loops=6)
        -> Index lookup on t0 using i7 (c3 = t3.c3)  (cost=4.36 rows=17) (actual time=0.00612..0.0477 rows=23 loops=6)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------+
| section     |
+-------------+
| FINAL NOTES |
+-------------+
+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| note                 | details                                                                                                                                                                                                                                                                                                                    |
+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Interpretation guide | If BASE remains t1->t3->t0 and is much slower than JOIN_ORDER(t3,t0,t1), the testcase demonstrates a join-order cost ranking inversion caused by severe equality-join fanout misestimation. If histograms do not change the plan/estimate, classify it as fanout misestimation despite available single-column histograms. |
+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
