set @@session.tidb_mem_quota_query=default; drop table if exists t, s; create table t(a int, index(a)); create table s(a int, index(a)); insert into t values(1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20), (21), (22), (23), (24), (25), (26), (27), (28), (29), (30), (31), (32), (33), (34), (35), (36), (37), (38), (39), (40), (41), (42), (43), (44), (45), (46), (47), (48), (49), (50), (51), (52), (53), (54), (55), (56), (57), (58), (59), (60), (61), (62), (63), (64), (65), (66), (67), (68), (69), (70), (71), (72), (73), (74), (75), (76), (77), (78), (79), (80), (81), (82), (83), (84), (85), (86), (87), (88), (89), (90), (91), (92), (93), (94), (95), (96), (97), (98), (99), (100), (101), (102), (103), (104), (105), (106), (107), (108), (109), (110), (111), (112), (113), (114), (115), (116), (117), (118), (119), (120), (121), (122), (123), (124), (125), (126), (127), (128); insert into s values(1), (128); set @@tidb_max_chunk_size=32; set @@tidb_index_lookup_join_concurrency=1; set @@tidb_index_join_batch_size=32; desc format = 'brief' select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=17000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=16000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=15000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=14000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=13000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=12000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=11000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=10000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=9000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=8000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=7000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=6000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=5000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=4000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=3000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=2000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1900; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1800; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1700; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1600; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1500; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1400; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1300; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1200; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1100; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a; set @@session.tidb_mem_quota_query=1000; select /*+ INL_HASH_JOIN(s) */ * from t join s on t.a=s.a order by t.a;