Comments - Should GROUP BY require ORDER BY in columnstore?

6 years, 2 months ago Andrew Hutchings

In this particular case the GROUP BY wouldn't order because it is within a subquery. But the MCOL ticket has it without the subquery so we will investigate ASAP.

MCOL-643 is semi-related. You need to set it max_length_for_sort_data high in ColumnStore for now. The reason is too complex to explain here. But we are working with the MariaDB Server team on a solution for this right now.

 
6 years, 1 month ago Mike Thibodeau

Thanks Andrew, I had originally tested this as one query. I should have pasted in this query,

SELECT DAY(timestamp_),FORMAT(SUM(numeric_val),4), FORMAT(AVG(numeric_val),4) 
    FROM cs1
    WHERE timestamp_ >= '2017-09-01 00:00:00' AND timestamp_ < '2017-10-01 00:00:00'
       AND id IN (228091,228231,228233,227867,228216,228241)
      GROUP BY DAY(timestamp_) ASC;

I separated it hoping to get past the max_length_for_sort_data problem. This query executes if the columns 'Total' and 'Average' are not formatted.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.