@@ -186,10 +186,6 @@ In ClickHouse, queries are always run on blocks (sets of column parts). This fun
...
@@ -186,10 +186,6 @@ In ClickHouse, queries are always run on blocks (sets of column parts). This fun
Returns estimation of uncompressed byte size of its arguments in memory.
Returns estimation of uncompressed byte size of its arguments in memory.
E.g. for [UInt32](../../sql-reference/data-types/int-uint.md) argument it will return constant 4, for [String](../../sql-reference/data-types/string.md) arguments — the string length + 9 (terminating zero + length).
The function can take multiple arguments. The typical application is byteSize(*).
Use case: suppose you have a service that stores data for multiple clients in one table. Users will pay per data volume. So, you need to implement accounting of users data volume. The function will allow to calculate the data size on per-row basis.
Use case: suppose you have a service that stores data for multiple clients in one table. Users will pay per data volume. So, you need to implement accounting of users data volume. The function will allow to calculate the data size on per-row basis.
В ClickHouse выполнение запроса всегда идёт по блокам (наборам кусочков столбцов). Функция позволяет получить размер блока, для которого её вызвали.
В ClickHouse выполнение запроса всегда идёт по блокам (наборам кусочков столбцов). Функция позволяет получить размер блока, для которого её вызвали.
## byteSize {#function-bytesize}
Returns estimation of uncompressed byte size of its arguments in memory. Возвращает примерный размер аргументов в памяти в байтах.
Пример использования: в сервисе, хранящим данные для нескольких клиентов в одной таблице, пользователь платит за хранение данных. Пэтому требуется узнать количество памяти, занимаемое ими. Функция позволяет вычислить размер данных для каждой строки.