до лимита далеко. В общем надо читать трейсы в логе кх, но проблема вообще никак не связана с ORDER BY таблицы
$ tail /var/log/clickhouse-server/clickhouse-server.log
2020.05.26 16:52:36.687968 [ 15 ] {} <Debug> projectname.impressions (MergerMutator): Merging 2 parts: from 202005_3224258_3230563_5243 to 202005_3230564_3230564_0 into tmp_merge_202005_3224258_3230564_5244
2020.05.26 16:52:36.688803 [ 15 ] {} <Debug> projectname.impressions (MergerMutator): Selected MergeAlgorithm: Horizontal
2020.05.26 16:52:36.688852 [ 15 ] {} <Trace> MergeTreeSequentialBlockInputStream: Reading 13 marks from part 202005_3224258_3230563_5243, total 94697 rows starting from the beginning of the part, columns: timestamp, id, impression_name, network_id, offer_id, ad_id, promo_id, merchant, affiliate, utm_source, utm_medium, utm_campaign, utm_term, utm_content, subid1, subid2, subid3, subid4, subid5, subid6, country, traffic_source, af_utm_source, af_utm_medium, af_utm_campaign, af_utm_term, af_utm_content, af_subid1, af_subid2, af_subid3, af_subid4, af_subid5, af_subid6
2020.05.26 16:52:36.689626 [ 15 ] {} <Trace> MergeTreeSequentialBlockInputStream: Reading 2 marks from part 202005_3230564_3230564_0, total 92 rows starting from the beginning of the part, columns: timestamp, id, impression_name, network_id, offer_id, ad_id, promo_id, merchant, affiliate, utm_source, utm_medium, utm_campaign, utm_term, utm_content, subid1, subid2, subid3, subid4, subid5, subid6, country, traffic_source, af_utm_source, af_utm_medium, af_utm_campaign, af_utm_term, af_utm_content, af_subid1, af_subid2, af_subid3, af_subid4, af_subid5, af_subid6
2020.05.26 16:52:36.704694 [ 8 ] {} <Debug> projectname.impression_views (MergerMutator): Merge sorted 42940 rows, containing 34 columns (34 merged, 0 gathered) in 0.03 sec., 1323663.17 rows/sec., 412.98 MB/sec.
2020.05.26 16:52:36.707770 [ 8 ] {} <Trace> projectname.impression_views: Renaming temporary part tmp_merge_202005_3880395_3880986_305 to 202005_3880395_3880986_305.
2020.05.26 16:52:36.707997 [ 8 ] {} <Trace> projectname.impression_views (MergerMutator): Merged 2 parts: from 202005_3880395_3880985_304 to 202005_3880986_3880986_0
2020.05.26 16:52:36.731593 [ 15 ] {} <Debug> projectname.impressions (MergerMutator): Merge sorted 94789 rows, containing 33 columns (33 merged, 0 gathered) in 0.04 sec., 2173338.84 rows/sec., 643.28 MB/sec.
2020.05.26 16:52:36.734150 [ 15 ] {} <Trace> projectname.impressions: Renaming temporary part tmp_merge_202005_3224258_3230564_5244 to 202005_3224258_3230564_5244.
2020.05.26 16:52:36.734377 [ 15 ] {} <Trace> projectname.impressions (MergerMutator): Merged 2 parts: from 202005_3224258_3230563_5243 to 202005_3230564_3230564_0