Database panel
To pane Database Setting add:
Database_ID
Comment
Database type
Access metod (RW, RO)
Storage Type (Disk, RAM)
Segment Size
This could be retrieved from a query:
FROM duckdb_databases() WHERE NOT internal;
To pane INFORMATION add:
DB Actual Size
DB Used Size
DB Free Size
Memory Used
Memory Limit
This could be retrieved from a query:
SELECT database_size as DB_SIZE,
formatReadableSize(block_size * used_blocks) as USED_SIZE,
formatReadableSize(block_size * free_blocks) as FREE_SIZE,
formatReadableSize(block_size) as BLOCK_SIZE,
memory_usage AS MEM_USED,
memory_limit as MEM_MAX
FROM pragma_database_size();
To Table panel INFORMATION add:
Table Size
This could be retrieved from a query:
select 'table_name' as table_name,
count(distinct block_id) as num_blocks, -- число блоков
formatReadableSize(count(distinct block_id) * (select block_size from pragma_database_size())) as num_bytes -- размер таблицы
from pragma_storage_info('table_name')
group by all;