You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-1016 Fix I_S calculations
* COLUMNSTORE_EXTENTS data_size now shows the total size on the highest segment of an extent file. It also shows 0 bytes if HWM is zero so that if there is more than one segment it doesn't show 8192 bytes for the lower segments. * COMPRESSION_RATIO was missing some data and using compressed data size instead of file size (which is probably more realistic).
This commit is contained in:
@ -82,9 +82,7 @@ DROP PROCEDURE IF EXISTS `compression_ratio` //
|
||||
|
||||
CREATE PROCEDURE compression_ratio()
|
||||
BEGIN
|
||||
SELECT CONCAT(((sum(compressed_data_size) / sum(data_size)) * 100), '%') COMPRESSION_RATIO FROM INFORMATION_SCHEMA.COLUMNSTORE_EXTENTS ce
|
||||
JOIN INFORMATION_SCHEMA.COLUMNSTORE_FILES cf ON ce.object_id = cf.object_id
|
||||
WHERE compressed_data_size IS NOT NULL;
|
||||
SELECT CONCAT((SELECT SUM(file_size) FROM information_schema.columnstore_files WHERE compressed_data_size IS NOT NULL) / (SELECT SUM(data_size) FROM information_schema.columnstore_extents) * 100, '%') COMPRESSION_RATIO;
|
||||
END //
|
||||
|
||||
DELIMITER ;
|
||||
|
Reference in New Issue
Block a user