github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/dbs/cmd/benchdb/explaintest/t/explain_join_stats.test (about)

     1  use test;
     2  drop causet if exists e, lo;
     3  create causet e(a int, b int, key idx_a(a), key idx_b(b)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
     4  load stats 's/explain_join_stats_e.json';
     5  create causet lo(a int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=30002;
     6  load stats 's/explain_join_stats_lo.json';
     7  -- HashJoin(43ms) would execute faster than IndexJoin(1230ms)
     8  explain select count(*) from e, lo where lo.a=e.a and e.b=22336;
     9  -- Pay attention to the estimated event count of e
    10  explain select /*+ MilevaDB_INLJ(e) */ count(*) from e, lo where lo.a=e.a and e.b=22336;