dbms: fixed performance issue caused by typo [#METR-14654].

This commit is contained in:
Alexey Milovidov 2015-01-19 22:51:46 +03:00
parent b3bee6ac08
commit a54a634595
3 changed files with 14 additions and 1 deletions

View File

@ -47,7 +47,7 @@ public:
void merge(AggregateDataPtr place, ConstAggregateDataPtr rhs) const
{
data(place).value.insert(data(place).value.begin(), data(rhs).value.begin(), data(rhs).value.end());
data(place).value.insert(data(place).value.end(), data(rhs).value.begin(), data(rhs).value.end());
}
void serialize(ConstAggregateDataPtr place, WriteBuffer & buf) const

View File

@ -0,0 +1,12 @@
0 100
1 100
2 100
3 100
4 100
5 100
6 100
7 100
8 100
9 100
0 1000000

View File

@ -0,0 +1 @@
SELECT intDiv(number, 100) AS k, length(groupArray(number)) FROM (SELECT * FROM system.numbers LIMIT 1000000) GROUP BY k WITH TOTALS ORDER BY k LIMIT 10;