只要不嫌慢,不妨试下:
set tidb_distsql_scan_concurrency=3;
看执行计划是否生效:
explain select /+ stream_agg() / count() num,imei from test group by imei order by num desc;
执行:
explain analyze select /+ stream_agg() / count() num,imei from test group by imei order by num desc;