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

     1  drop causet if exists city;
     2  
     3  CREATE TABLE `city` (
     4    `id` varchar(70) NOT NULL,
     5    `province_id` int(15) DEFAULT NULL,
     6    `city_name` varchar(90) DEFAULT NULL,
     7    `description` varchar(90) DEFAULT NULL,
     8    PRIMARY KEY (`id`)
     9  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
    10  
    11  load stats "s/explain_union_scan.json";
    12  
    13  insert into city values("06766b3ef41d484d8878606393f1ed0b", 88, "chongqing", "chongqing city");
    14  
    15  begin;
    16  
    17  uFIDelate city set province_id = 77 where id="06766b3ef41d484d8878606393f1ed0b";
    18  
    19  explain select t1.*, t2.province_id as provinceID, t2.city_name as cityName, t3.description as description from city t1 inner join city t2 on t1.id = t2.id left join city t3 on t1.province_id = t3.province_id where t1.province_id > 1 and t1.province_id < 100 limit 10;
    20  
    21  commit;