mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add data comparison
This commit is contained in:
parent
8d2f0e0cda
commit
cb42608fab
@ -1,3 +1,6 @@
|
||||
91
|
||||
1
|
||||
46
|
||||
1
|
||||
33
|
||||
1
|
||||
|
@ -22,9 +22,18 @@ OPTIMIZE TABLE test.default_codec_synthetic FINAL;
|
||||
SELECT
|
||||
floor(big_size / small_size) AS ratio
|
||||
FROM
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) AS small_size FROM system.parts WHERE database = 'test' and table = 'delta_codec_synthetic')
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) as big_size FROM system.parts WHERE database = 'test' and table = 'default_codec_synthetic') USING(key);
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) AS small_size FROM system.parts WHERE database == 'test' and table == 'delta_codec_synthetic')
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) as big_size FROM system.parts WHERE database == 'test' and table == 'default_codec_synthetic')
|
||||
USING(key);
|
||||
|
||||
SELECT
|
||||
small_hash == big_hash
|
||||
FROM
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS small_hash FROM test.delta_codec_synthetic)
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS big_hash FROM test.default_codec_synthetic)
|
||||
USING(key);
|
||||
|
||||
DROP TABLE IF EXISTS test.delta_codec_synthetic;
|
||||
DROP TABLE IF EXISTS test.default_codec_synthetic;
|
||||
@ -55,6 +64,14 @@ FROM
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) as big_size FROM system.parts WHERE database = 'test' and table = 'default_codec_float') USING(key);
|
||||
|
||||
SELECT
|
||||
small_hash == big_hash
|
||||
FROM
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS small_hash FROM test.delta_codec_float)
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS big_hash FROM test.default_codec_float)
|
||||
USING(key);
|
||||
|
||||
DROP TABLE IF EXISTS test.delta_codec_float;
|
||||
DROP TABLE IF EXISTS test.default_codec_float;
|
||||
|
||||
@ -85,5 +102,13 @@ FROM
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(bytes_on_disk) as big_size FROM system.parts WHERE database = 'test' and table = 'default_codec_string') USING(key);
|
||||
|
||||
SELECT
|
||||
small_hash == big_hash
|
||||
FROM
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS small_hash FROM test.delta_codec_string)
|
||||
INNER JOIN
|
||||
(SELECT 1 AS key, sum(cityHash64(*)) AS big_hash FROM test.default_codec_string)
|
||||
USING(key);
|
||||
|
||||
DROP TABLE IF EXISTS test.delta_codec_string;
|
||||
DROP TABLE IF EXISTS test.default_codec_string;
|
||||
|
Loading…
Reference in New Issue
Block a user