You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Si-li Liu <un...@gmail.com> on 2022/11/01 16:17:52 UTC

why select limit so slow on yarn cluster

I created a table using Flink SQL on yarn session.

CREATE TEMPORARY TABLE `scrm_admin_role` (
>   `id` bigint,
>   `role_name` string,
>   `sort` int,
>   `type` tinyint,
>   `status` tinyint,
>   `tenant_id` bigint,
>   `deleted` BOOLEAN,
>   `create_time` TIMESTAMP,
>   `update_time` TIMESTAMP,
>   PRIMARY KEY (`id`) NOT ENFORCED
> ) WITH (
>   'connector' = 'jdbc',
>   'url'='jdbc:mysql://172.17.16.45:3306/willing_base',
>   'username' = '*',
>   'password' = *',
>   'table-name' = 'scrm_admin_role'
> );

The origin table is very small, about 10k lines.

Then I tried to select to check the data, select * from scrm_admin_role
limit 10; It can retrieve the result, but very slow, maybe took about 2~3
minutes. Cloud anyone tell me why and how cloud I make it fast.


-- 
Best regards

Sili Liu

Re: why select limit so slow on yarn cluster

Posted by yuxia <lu...@alumni.sjtu.edu.cn>.
Such sql should be finished quickly. 
Could you please look at which part cost much time? Starting the job or running the job or other stuff. 
And how about the network? 
Btw, what's the logic plan and physical plan? You can use `explain select * from scrm_admin_role limit 10` to show the plan. 

Best regards, 
Yuxia 


发件人: "Si-li Liu" <un...@gmail.com> 
收件人: "User" <us...@flink.apache.org> 
发送时间: 星期三, 2022年 11 月 02日 上午 12:17:52 
主题: why select limit so slow on yarn cluster 


I created a table using Flink SQL on yarn session. 

CREATE TEMPORARY TABLE `scrm_admin_role` ( 
> `id` bigint, 
> `role_name` string, 
> `sort` int, 
> `type` tinyint, 
> `status` tinyint, 
> `tenant_id` bigint, 
> `deleted` BOOLEAN, 
> `create_time` TIMESTAMP, 
> `update_time` TIMESTAMP, 
> PRIMARY KEY (`id`) NOT ENFORCED 
> ) WITH ( 
> 'connector' = 'jdbc', 
> 'url'='jdbc:mysql:// [ http://172.17.16.45:3306/willing_base | 172.17.16.45:3306/willing_base ] ', 
> 'username' = '*', 
> 'password' = *', 
> 'table-name' = 'scrm_admin_role' 
> ); 

The origin table is very small, about 10k lines. 

Then I tried to select to check the data, select * from scrm_admin_role limit 10; It can retrieve the result, but very slow, maybe took about 2~3 minutes. Cloud anyone tell me why and how cloud I make it fast. 

-- 
Best regards 

Sili Liu