v.23.3Performance Improvement

Updated clickhouse-copier to enhance partition selection speed using GROUP BY

Updated clickhouse-copier to use GROUP BY instead of DISTINCT to get the list of partitions. For large tables, this reduced the select time from over 500s to under 1s. #47386 (Clayton McClure).