Swathi Desai
Swathi Desai

Reputation: 1

Does the space usage reported by MemSQL INFORMATION_SCHEMA.COLUMNAR_SEGMENTS include redundancy?

I am trying to get the space used by a columnstore table using INFORMATION_SCHEMA.COLUMNAR_SEGMENTS table. However I am not sure if the reported usage includes redundancy as well. The query I am using is below,

SELECT
DATABASE_NAME AS DB,
TABLE_NAME AS TABLE_NAME ,
"" AS TOTAL_MEMORY_MB ,
SUM(UNCOMPRESSED_SIZE)/(1024*1024) AS DISK_UNCOMP_MB ,
SUM(COMPRESSED_SIZE)/(1024*1024) AS DISK_COMP_MB
FROM INFORMATION_SCHEMA.COLUMNAR_SEGMENTS
WHERE TABLE_NAME = "table_name"

Could somebody please help me understand the space usage reported by this table? Does it include redundancy as well? If we don't aggregate, it gives the result for individual partitions. However, I am not sure if it includes the redundant partition as well.

Upvotes: 0

Views: 155

Answers (1)

Adam Prout
Adam Prout

Reputation: 739

yes, COLUMNAR_SEGMENTS includes redundancy (it shows all blob files on disk, no matter if on a master or slave). You can see this by inserting one row into a table in redundancy 2 (and running optimize table so the row is converted into columnstore format) and then querying for all blobs (you will see 2 blob files on 2 different nodes).

Upvotes: 1

Related Questions