📄 group_min_max.result
字号:
1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-byexplain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-byexplain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-byexplain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-byselect a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;a1 a2 b min(c) max(c)a a b e112 h112b a b e212 h212c a b e312 h312c b b m322 p322d a b e412 h412d b b m422 p422select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;a1 a2 b min(c) max(c)a a a c111 d111a a b e112 h112b a a b211 d211b a b e212 h212c a a b311 d311c a b e312 h312c b a i321 l321c b b m322 p322d a a b411 d411d a b e412 h412d b a i421 l421d b b m422 p422select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;a1 a2 b min(c) max(c)a b a i121 l121b b a i221 l221c b a i321 l321d b a i421 l421select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;a1 a2 b min(c)b b a k221c b a k321d b a k421select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;a1 a2 b min(c)b b a k221c b a k321d b a k421select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;a1 a2 b min(c)select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;a1 a2 b min(c)select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;a1 a2 b min(c) max(c)a a b e112 h112b a b e212 h212c a b e312 h312c b b m322 p322d a b e412 h412d b b m422 p422e a b NULL NULLselect a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;a1 a2 b min(c) max(c)a a a c111 d111a a b e112 h112b a a b211 d211b a b e212 h212c a NULL c777 c999c a a b311 d311c a b e312 h312c b a i321 l321c b b m322 p322d a a b411 d411d a b e412 h412d b a i421 l421d b b m422 p422select a1,a2,b,min(c),max(c) from t2 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;a1 a2 b min(c) max(c)a b a i121 l121b b a i221 l221c b a i321 l321d b a i421 l421select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;a1 a2 b min(c)b b a k221c b a k321d b a k421select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;a1 a2 b min(c)b b a k221c b a k321d b a k421select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;a1 a2 b min(c)explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-byexplain select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-byexplain select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using indexexplain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-byselect a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;a1 a2 ba a bb a bc a bc b bd a bd b bselect a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;a1 a2 ba b ab b ac b ad b aselect a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;a1 a2 b ca b a i121select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;a1 a2 bselect a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;a1 a2 ba a bb a bc a bc b bd a bd b be a bselect a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;a1 a2 ba b ab b ac b ad b aselect a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;a1 a2 b ca b a i121select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;a1 a2 bexplain select distinct a1,a2,b from t1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-byexplain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using indexexplain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-byexplain select distinct b from t1 where (a2 >= 'b') and (b = 'a');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using indexexplain select distinct a1,a2,b from t2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-byexplain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using indexexplain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-byexplain select distinct b from t2 where (a2 >= 'b') and (b = 'a');id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 index NULL idx_t2_2 146 NULL 164 Using where; Using indexselect distinct a1,a2,b from t1;a1 a2 ba a aa a ba b aa b bb a ab a bb b ab b bc a ac a bc b ac b bd a ad a bd b ad b bselect distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');a1 a2 ba b ab b ac b ad b aselect distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');a1 a2 b ca b a i121select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');a1 a2 bselect distinct b from t1 where (a2 >= 'b') and (b = 'a');baselect distinct a1,a2,b from t2;a1 a2 ba a NULLa a aa a ba b aa b bb a ab a bb b ab b bc a NULLc a ac a bc b ac b bd a ad a bd b ad b be a ae a bselect distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a');a1 a2 ba b ab b ac b ad b aselect distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');a1 a2 b ca b a i121select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');a1 a2 bselect distinct b from t2 where (a2 >= 'b') and (b = 'a');baselect distinct t_00.a1from t1 t_00where exists ( select * from t2 where a1 = t_00.a1 );a1abcdselect distinct a1,a1 from t1;a1 a1a ab bc cd dselect distinct a2,a1,a2,a1 from t1;a2 a1 a2 a1a a a ab a b aa b a bb b b ba c a cb c b ca d a db d b dselect distinct t1.a1,t2.a1 from t1,t2;a1 a1a ab ac ad aa bb bc bd ba cb cc cd ca db dc dd da eb ec ed eexplain select distinct a1,a2,b from t1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-byexplain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-byexplain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by; Using temporary; Using filesortexplain select distinct a1,a2,b from t2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-byexplain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select distinct a1,a2,b,c from t2 where (a2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -