mysql: [Warning] Using a password on the command line interface can be insecure.
+------------------------------+---------+----------+----------+
| Table                        | Op      | Msg_type | Msg_text |
+------------------------------+---------+----------+----------+
| mysql_hg_between_nonempty.t1 | analyze | status   | OK       |
| mysql_hg_between_nonempty.t2 | analyze | status   | OK       |
| mysql_hg_between_nonempty.t3 | analyze | status   | OK       |
+------------------------------+---------+----------+----------+
+---------------------------+
| phase                     |
+---------------------------+
| 0. version and row counts |
+---------------------------+
+---------------+
| mysql_version |
+---------------+
| 9.7.1         |
+---------------+
+------------+-----------+---------+---------+
| table_name | row_count | min_c1  | max_c1  |
+------------+-----------+---------+---------+
| t1         |      6000 | 1000001 | 1006000 |
| t2         |      6000 | 2000011 | 3000010 |
| t3         |      6000 | 3000001 | 3006000 |
+------------+-----------+---------+---------+
+------------------------+
| phase                  |
+------------------------+
| 1. join-overlap sanity |
+------------------------+
+---------------+---------------+-----------------+
| t1_t3_eq_rows | t2_t3_eq_rows | final_join_rows |
+---------------+---------------+-----------------+
|          6000 |            10 |              10 |
+---------------+---------------+-----------------+
+-----------------------+
| phase                 |
+-----------------------+
| 2. result equivalence |
+-----------------------+
+---------------+-------------+----------+
| variant       | result_rows | checksum |
+---------------+-------------+----------+
| EQUALITY_FORM |          10 | 40000110 |
| BETWEEN_EQUIV |          10 | 40000110 |
| GE_LE_EQUIV   |          10 | 40000110 |
| NOT_NE_EQUIV  |          10 | 40000110 |
+---------------+-------------+----------+
+------------------------------------+
| phase                              |
+------------------------------------+
| 3. legacy optimizer: equality form |
+------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t2.c1 = t3.c1)  (cost=3.53e+6 rows=1.18e+6)
    -> Table scan on t2  (cost=0.118 rows=6011)
    -> Hash
        -> Nested loop inner join  (cost=2651 rows=5875)
            -> Filter: ((t3.c1 <= 1596112929) and (t3.c0 is not null))  (cost=594 rows=5875)
                -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875)
            -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t2.c1 = t3.c1)  (cost=3.53e+6 rows=1.18e+6) (actual time=14.8..19 rows=10 loops=1)
    -> Table scan on t2  (cost=0.118 rows=6011) (actual time=0.00567..2.53 rows=6000 loops=1)
    -> Hash
        -> Nested loop inner join  (cost=2651 rows=5875) (actual time=0.0162..13.7 rows=6000 loops=1)
            -> Filter: ((t3.c1 <= 1596112929) and (t3.c0 is not null))  (cost=594 rows=5875) (actual time=0.00927..3.3 rows=6000 loops=1)
                -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875) (actual time=0.00816..2.71 rows=6000 loops=1)
            -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1) (actual time=0.00122..0.00158 rows=1 loops=6000)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------+
| phase                                        |
+----------------------------------------------+
| 4. legacy optimizer: BETWEEN-equivalent form |
+----------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Filter: (t3.c1 between t2.c1 and t2.c1)  (cost=134092 rows=48423)
    -> Inner hash join (no condition)  (cost=134092 rows=48423)
        -> Filter: (t2.c1 <= 1596112929)  (cost=0.118 rows=223)
            -> Table scan on t2  (cost=0.118 rows=6011)
        -> Hash
            -> Nested loop inner join  (cost=2651 rows=5875)
                -> Filter: (t3.c0 is not null)  (cost=594 rows=5875)
                    -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875)
                -> Filter: (t3.c0 between t1.c1 and t1.c1)  (cost=0.25 rows=1)
                    -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Filter: (t3.c1 between t2.c1 and t2.c1)  (cost=134092 rows=48423) (actual time=15.5..3493 rows=10 loops=1)
    -> Inner hash join (no condition)  (cost=134092 rows=48423) (actual time=15..1802 rows=36e+6 loops=1)
        -> Filter: (t2.c1 <= 1596112929)  (cost=0.118 rows=223) (actual time=0.00565..4.74 rows=6000 loops=1)
            -> Table scan on t2  (cost=0.118 rows=6011) (actual time=0.00473..4.08 rows=6000 loops=1)
        -> Hash
            -> Nested loop inner join  (cost=2651 rows=5875) (actual time=0.0148..14.5 rows=6000 loops=1)
                -> Filter: (t3.c0 is not null)  (cost=594 rows=5875) (actual time=0.00809..3.06 rows=6000 loops=1)
                    -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875) (actual time=0.00763..2.67 rows=6000 loops=1)
                -> Filter: (t3.c0 between t1.c1 and t1.c1)  (cost=0.25 rows=1) (actual time=0.00133..0.00175 rows=1 loops=6000)
                    -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1) (actual time=0.00119..0.00155 rows=1 loops=6000)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------+
| phase                                          |
+------------------------------------------------+
| 5. legacy optimizer: >= and <= equivalent form |
+------------------------------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=780e+6 rows=865e+6)
    -> Nested loop inner join  (cost=1.18e+6 rows=1.31e+6)
        -> Filter: (t2.c1 <= 1596112929)  (cost=625 rows=2003)
            -> Table scan on t2  (cost=625 rows=6011)
        -> Filter: ((t3.c1 >= t2.c1) and (t3.c1 <= t2.c1))  (cost=0.0363 rows=653)
            -> Index range scan on t3 (re-planned for each iteration)  (cost=0.0363 rows=5875)
    -> Filter: ((t3.c0 >= t1.c1) and (t3.c0 <= t1.c1))  (cost=600e-6 rows=662)
        -> Index range scan on t1 (re-planned for each iteration)  (cost=600e-6 rows=5956)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Nested loop inner join  (cost=780e+6 rows=865e+6) (actual time=0.049..21325 rows=10 loops=1)
    -> Nested loop inner join  (cost=1.18e+6 rows=1.31e+6) (actual time=0.0196..21324 rows=10 loops=1)
        -> Filter: (t2.c1 <= 1596112929)  (cost=625 rows=2003) (actual time=0.00934..4.11 rows=6000 loops=1)
            -> Table scan on t2  (cost=625 rows=6011) (actual time=0.00855..3.32 rows=6000 loops=1)
        -> Filter: ((t3.c1 >= t2.c1) and (t3.c1 <= t2.c1))  (cost=0.0363 rows=653) (actual time=3.55..3.55 rows=0.00167 loops=6000)
            -> Index range scan on t3 (re-planned for each iteration)  (cost=0.0363 rows=5875) (actual time=0.00377..3.05 rows=6000 loops=6000)
    -> Filter: ((t3.c0 >= t1.c1) and (t3.c0 <= t1.c1))  (cost=600e-6 rows=662) (actual time=0.00974..0.0104 rows=1 loops=10)
        -> Index range scan on t1 (re-planned for each iteration)  (cost=600e-6 rows=5956) (actual time=0.0095..0.0101 rows=1 loops=10)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------+
| phase                                               |
+-----------------------------------------------------+
| 6. legacy optimizer: NOT <> equivalent control form |
+-----------------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t2.c1 = t3.c1)  (cost=3.53e+6 rows=1.18e+6)
    -> Table scan on t2  (cost=0.118 rows=6011)
    -> Hash
        -> Nested loop inner join  (cost=2651 rows=5875)
            -> Filter: ((t3.c1 <= 1596112929) and (t3.c0 is not null))  (cost=594 rows=5875)
                -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875)
            -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t2.c1 = t3.c1)  (cost=3.53e+6 rows=1.18e+6) (actual time=18.4..22.6 rows=10 loops=1)
    -> Table scan on t2  (cost=0.118 rows=6011) (actual time=0.00624..2.59 rows=6000 loops=1)
    -> Hash
        -> Nested loop inner join  (cost=2651 rows=5875) (actual time=0.0188..17.1 rows=6000 loops=1)
            -> Filter: ((t3.c1 <= 1596112929) and (t3.c0 is not null))  (cost=594 rows=5875) (actual time=0.00939..4.02 rows=6000 loops=1)
                -> Covering index scan on t3 using i_t3_c0_c1  (cost=594 rows=5875) (actual time=0.00818..3.4 rows=6000 loops=1)
            -> Covering index lookup on t1 using i_t1_c1 (c1 = t3.c0)  (cost=0.25 rows=1) (actual time=0.00157..0.00201 rows=1 loops=6000)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------+
| phase                                  |
+----------------------------------------+
| 7. hypergraph optimizer: equality form |
+----------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t3.c1 = t2.c1)  (cost=14287..45878 rows=1.19e+6)
    -> Inner hash join (t3.c0 = t1.c1)  (cost=3851..6998 rows=5956)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875)
        -> Hash
            -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956)
    -> Hash
        -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003)
            -> Table scan on t2  (cost=1.57..9418 rows=6011)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t3.c1 = t2.c1)  (cost=14287..45878 rows=1.19e+6) (actual time=6.93..11 rows=10 loops=1)
    -> Inner hash join (t3.c0 = t1.c1)  (cost=3851..6998 rows=5956) (actual time=3.04..6.64 rows=6000 loops=1)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875) (actual time=0.00467..2.69 rows=6000 loops=1)
        -> Hash
            -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956) (actual time=0.00711..2.25 rows=6000 loops=1)
    -> Hash
        -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003) (actual time=0.0105..3.07 rows=6000 loops=1)
            -> Table scan on t2  (cost=1.57..9418 rows=6011) (actual time=0.00949..2.64 rows=6000 loops=1)
 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------+
| phase                                            |
+--------------------------------------------------+
| 8. hypergraph optimizer: BETWEEN-equivalent form |
+--------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (no condition), extra conditions: (t3.c0 between t1.c1 and t1.c1)  (cost=14287..70.2e+6 rows=865e+6)
    -> Inner hash join (no condition), extra conditions: (t3.c1 between t2.c1 and t2.c1)  (cost=10436..119071 rows=1.31e+6)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875)
        -> Hash
            -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003)
                -> Table scan on t2  (cost=1.57..9418 rows=6011)
    -> Hash
        -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (no condition), extra conditions: (t3.c0 between t1.c1 and t1.c1)  (cost=14287..70.2e+6 rows=865e+6) (actual time=6.33..1084 rows=10 loops=1)
    -> Inner hash join (no condition), extra conditions: (t3.c1 between t2.c1 and t2.c1)  (cost=10436..119071 rows=1.31e+6) (actual time=3.56..1079 rows=10 loops=1)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875) (actual time=0.00323..4.18 rows=6000 loops=1)
        -> Hash
            -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003) (actual time=0.0042..2.97 rows=6000 loops=1)
                -> Table scan on t2  (cost=1.57..9418 rows=6011) (actual time=0.00349..2.53 rows=6000 loops=1)
    -> Hash
        -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956) (actual time=0.00637..2.21 rows=6000 loops=1)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------+
| phase                                              |
+----------------------------------------------------+
| 9. hypergraph optimizer: >= and <= equivalent form |
+----------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (no condition), extra conditions: (t3.c0 >= t1.c1) and (t3.c0 <= t1.c1)  (cost=14287..120e+6 rows=865e+6)
    -> Inner hash join (no condition), extra conditions: (t3.c1 >= t2.c1) and (t3.c1 <= t2.c1)  (cost=10436..194380 rows=1.31e+6)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875)
        -> Hash
            -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003)
                -> Table scan on t2  (cost=1.57..9418 rows=6011)
    -> Hash
        -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956)
 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (no condition), extra conditions: (t3.c0 >= t1.c1) and (t3.c0 <= t1.c1)  (cost=14287..120e+6 rows=865e+6) (actual time=6.47..2109 rows=10 loops=1)
    -> Inner hash join (no condition), extra conditions: (t3.c1 >= t2.c1) and (t3.c1 <= t2.c1)  (cost=10436..194380 rows=1.31e+6) (actual time=3.61..2104 rows=10 loops=1)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875) (actual time=0.00567..4.24 rows=6000 loops=1)
        -> Hash
            -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003) (actual time=0.0058..2.88 rows=6000 loops=1)
                -> Table scan on t2  (cost=1.57..9418 rows=6011) (actual time=0.0044..2.44 rows=6000 loops=1)
    -> Hash
        -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956) (actual time=0.01..2.25 rows=6000 loops=1)
 |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------+
| phase                                                    |
+----------------------------------------------------------+
| 10. hypergraph optimizer: NOT <> equivalent control form |
+----------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t3.c1 = t2.c1)  (cost=14287..45878 rows=1.19e+6)
    -> Inner hash join (t3.c0 = t1.c1)  (cost=3851..6998 rows=5956)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875)
        -> Hash
            -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956)
    -> Hash
        -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003)
            -> Table scan on t2  (cost=1.57..9418 rows=6011)
 |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Inner hash join (t3.c1 = t2.c1)  (cost=14287..45878 rows=1.19e+6) (actual time=7.07..11.2 rows=10 loops=1)
    -> Inner hash join (t3.c0 = t1.c1)  (cost=3851..6998 rows=5956) (actual time=3.35..6.98 rows=6000 loops=1)
        -> Covering index scan on t3 using i_t3_c0_c1  (cost=0.378..2222 rows=5875) (actual time=0.0072..2.69 rows=6000 loops=1)
        -> Hash
            -> Covering index scan on t1 using i_t1_c1  (cost=0.311..1855 rows=5956) (actual time=0.00729..2.45 rows=6000 loops=1)
    -> Hash
        -> Filter: (t2.c1 <= 1596112929)  (cost=4.87..9764 rows=2003) (actual time=0.0101..2.91 rows=6000 loops=1)
            -> Table scan on t2  (cost=1.57..9418 rows=6011) (actual time=0.00932..2.48 rows=6000 loops=1)
 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+------------------------+
| phase                  |
+------------------------+
| 11. sample result rows |
+------------------------+
+---------+---------+
| ref0    | ref1    |
+---------+---------+
| 1000001 | 3000001 |
| 1000002 | 3000002 |
| 1000003 | 3000003 |
| 1000004 | 3000004 |
| 1000005 | 3000005 |
| 1000006 | 3000006 |
| 1000007 | 3000007 |
| 1000008 | 3000008 |
| 1000009 | 3000009 |
| 1000010 | 3000010 |
+---------+---------+
+-------+
| phase |
+-------+
| done  |
+-------+
