Merge pull request #21442 from traceon/row-policy-with-prewhere-perf-test-fix

Adjust prewhere_with_row_level_filter performance test
This commit is contained in:
Nikolai Kochetov 2021-03-06 22:59:00 +03:00 committed by GitHub
commit 47d684a5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 13 deletions

View File

@ -5,5 +5,6 @@
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
<users_config>users.xml</users_config>
<access_control_path>/var/lib/clickhouse/access/</access_control_path>
<!-- Path to directory where users created by SQL commands are stored. -->
<access_control_path>access/</access_control_path>
</yandex>

View File

@ -1,17 +1,22 @@
<test>
<create_query>DROP TABLE IF EXISTS test_prl;</create_query>
<create_query>CREATE TABLE test_prl (n UInt64) ENGINE MergeTree ORDER BY n;</create_query>
<!--<create_query>GRANT CREATE ROW POLICY ON *.* TO CURRENT_USER</create_query>-->
<create_query>CREATE ROW POLICY OR REPLACE test_prl_policy ON test_prl AS PERMISSIVE FOR SELECT USING n % 7 TO ALL;</create_query>
<settings>
<max_threads>1</max_threads>
<max_insert_threads>10</max_insert_threads>
<optimize_move_to_prewhere>0</optimize_move_to_prewhere>
</settings>
<fill_query>INSERT INTO test_prl SELECT number FROM numbers(500000000);</fill_query>
<create_query>DROP TABLE IF EXISTS test_prl</create_query>
<create_query>CREATE TABLE test_prl (n UInt64) ENGINE MergeTree ORDER BY n</create_query>
<create_query>CREATE ROW POLICY OR REPLACE test_prl_policy ON test_prl AS PERMISSIVE FOR SELECT USING n % 7 TO ALL</create_query>
<query>SELECT sum(n) FROM test_prl settings max_threads=1;</query>
<query>SELECT sum(n) FROM test_prl WHERE n % 3 AND n % 5 SETTINGS optimize_move_to_prewhere = 0, max_threads=1;</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 3 AND n % 5 settings max_threads=1;</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 3 WHERE n % 5 settings max_threads=1;</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 5 WHERE n % 3 settings max_threads=1;</query>
<fill_query>INSERT INTO test_prl SELECT number FROM numbers(100000000)</fill_query>
<drop_query>DROP ROW POLICY IF EXISTS test_prl_policy ON test_prl;</drop_query>
<drop_query>DROP TABLE IF EXISTS test_prl;</drop_query>
<query>SELECT sum(n) FROM test_prl</query>
<query>SELECT sum(n) FROM test_prl WHERE n % 3 AND n % 5</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 3 AND n % 5</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 3 WHERE n % 5</query>
<query>SELECT sum(n) FROM test_prl PREWHERE n % 5 WHERE n % 3</query>
<drop_query>DROP ROW POLICY IF EXISTS test_prl_policy ON test_prl</drop_query>
<drop_query>DROP TABLE IF EXISTS test_prl</drop_query>
</test>