Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.1.6, 1.2.2
-
None
-
2019-01
Description
Both columnstore_info.table_usage() and infromation_schema.columnstore_files report incorrect disk space usage for a table. Consider:
releasenum
|
root@c3ca474b665d:/git/cs-docker-tools/generator# du -sh /usr/local/mariadb/columnstore/data1/
|
5,9G /usr/local/mariadb/columnstore/data1/
|
|
MariaDB [test]> call columnstore_info.table_usage('test', 'cs2');
|
+--------------+------------+-----------------+-----------------+-------------+
|
| TABLE_SCHEMA | TABLE_NAME | DATA_DISK_USAGE | DICT_DATA_USAGE | TOTAL_USAGE |
|
+--------------+------------+-----------------+-----------------+-------------+
|
| test | cs2 | 396.02 MB | 0.00 Bytes | 396.02 MB |
|
+--------------+------------+-----------------+-----------------+-------------+
|
1 row in set (0.03 sec)
|
|
Query OK, 0 rows affected (0.03 sec)
|
|
MariaDB [test]>
|
|
|
MariaDB [test]> select * from information_schema.columnstore_files;
|
+-----------+------------+--------------+------------------------------------------------------------------------------------------+-----------+----------------------+
|
| OBJECT_ID | SEGMENT_ID | PARTITION_ID | FILENAME | FILE_SIZE | COMPRESSED_DATA_SIZE |
|
+-----------+------------+--------------+------------------------------------------------------------------------------------------+-----------+----------------------+
|
| 3019 | 0 | 0 | /usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/203.dir/000.dir/FILE000.cdf | 103809024 | 103809024 |
|
| 3019 | 1 | 0 | /usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/203.dir/000.dir/FILE001.cdf | 103817216 | 103817216 |
|
| 3019 | 2 | 0 | /usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/203.dir/000.dir/FILE002.cdf | 103817216 | 103817216 |
|
| 3019 | 3 | 0 | /usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/203.dir/000.dir/FILE003.cdf | 103817216 | 103817216 |
|
+-----------+------------+--------------+------------------------------------------------------------------------------------------+-----------+----------------------+
|
4 rows in set (0.03 sec)
|