This commit is contained in:
kssenii 2022-08-28 15:57:46 +02:00
parent a0bc5b6ea4
commit 3be79fc145
2 changed files with 13 additions and 13 deletions

View File

@ -9,7 +9,7 @@ INSERT INTO nopers SELECT number, toString(number) FROM numbers(10);
SELECT * FROM nopers FORMAT Null; SELECT * FROM nopers FORMAT Null;
SELECT sum(size) FROM system.filesystem_cache; SELECT sum(size) FROM system.filesystem_cache;
194 194
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path
@ -19,8 +19,8 @@ INNER JOIN
system.filesystem_cache AS caches system.filesystem_cache AS caches
ON data_paths.cache_path = caches.cache_path ON data_paths.cache_path = caches.cache_path
ORDER BY file, cache, size; ORDER BY file, cache, size;
data.bin 114 data.bin 0 114
data.mrk3 80 data.mrk3 0 80
DROP TABLE IF EXISTS test; DROP TABLE IF EXISTS test;
CREATE TABLE test (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760; CREATE TABLE test (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760;
SYSTEM STOP MERGES test; SYSTEM STOP MERGES test;
@ -32,7 +32,7 @@ SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, re
4 4
SELECT count() FROM system.filesystem_cache; SELECT count() FROM system.filesystem_cache;
4 4
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path
@ -42,9 +42,9 @@ INNER JOIN
system.filesystem_cache AS caches system.filesystem_cache AS caches
ON data_paths.cache_path = caches.cache_path ON data_paths.cache_path = caches.cache_path
ORDER BY file, cache, size; ORDER BY file, cache, size;
data.bin 114 data.bin 0 114
data.bin 0 746 data.bin 0 746
data.mrk3 80 data.mrk3 0 80
data.mrk3 0_persistent 80 data.mrk3 0_persistent 80
DROP TABLE IF EXISTS test2; DROP TABLE IF EXISTS test2;
CREATE TABLE test2 (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760; CREATE TABLE test2 (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760;
@ -57,7 +57,7 @@ SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, re
4 4
SELECT count() FROM system.filesystem_cache; SELECT count() FROM system.filesystem_cache;
4 4
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path
@ -67,8 +67,8 @@ INNER JOIN
system.filesystem_cache AS caches system.filesystem_cache AS caches
ON data_paths.cache_path = caches.cache_path ON data_paths.cache_path = caches.cache_path
ORDER BY file, cache, size; ORDER BY file, cache, size;
data.bin 114 data.bin 0 114
data.mrk3 80 data.mrk3 0 80
data.mrk3 0_persistent 80 data.mrk3 0_persistent 80
data.mrk3 0_persistent 520 data.mrk3 0_persistent 520
DROP TABLE test; DROP TABLE test;

View File

@ -1,4 +1,4 @@
-- Tags: disabled -- Tags: no-fasttest, no-parallel, no-s3-storage, no-random-settings
-- { echo } -- { echo }
@ -14,7 +14,7 @@ INSERT INTO nopers SELECT number, toString(number) FROM numbers(10);
SELECT * FROM nopers FORMAT Null; SELECT * FROM nopers FORMAT Null;
SELECT sum(size) FROM system.filesystem_cache; SELECT sum(size) FROM system.filesystem_cache;
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path
@ -37,7 +37,7 @@ SELECT sum(size) FROM system.filesystem_cache;
SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path; SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path;
SELECT count() FROM system.filesystem_cache; SELECT count() FROM system.filesystem_cache;
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path
@ -60,7 +60,7 @@ SELECT sum(size) FROM system.filesystem_cache;
SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path; SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path;
SELECT count() FROM system.filesystem_cache; SELECT count() FROM system.filesystem_cache;
SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size
FROM FROM
( (
SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path