mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Added a test
This commit is contained in:
parent
0eb2f4dee9
commit
6ec9287925
@ -0,0 +1,10 @@
|
||||
Ok (1)
|
||||
Ok (2)
|
||||
2000000
|
||||
1
|
||||
Ok (3)
|
||||
2000000
|
||||
1
|
||||
Ok (4)
|
||||
1000000
|
||||
Ok (5)
|
40
tests/queries/0_stateless/01287_max_execution_speed.sql
Normal file
40
tests/queries/0_stateless/01287_max_execution_speed.sql
Normal file
@ -0,0 +1,40 @@
|
||||
SET min_execution_speed = 100000000000, timeout_before_checking_execution_speed = 0.1;
|
||||
SELECT count() FROM system.numbers; -- { serverError 160 }
|
||||
SELECT 'Ok (1)';
|
||||
SET min_execution_speed = 0;
|
||||
|
||||
SET min_execution_speed_bytes = 800000000000, timeout_before_checking_execution_speed = 0.1;
|
||||
SELECT count() FROM system.numbers; -- { serverError 160 }
|
||||
SELECT 'Ok (2)';
|
||||
SET min_execution_speed_bytes = 0;
|
||||
|
||||
SET max_execution_speed = 1000000;
|
||||
SET max_block_size = 100;
|
||||
|
||||
CREATE TEMPORARY TABLE times (t DateTime);
|
||||
|
||||
INSERT INTO times SELECT now();
|
||||
SELECT count() FROM numbers(2000000);
|
||||
INSERT INTO times SELECT now();
|
||||
|
||||
SELECT max(t) - min(t) >= 1 FROM times;
|
||||
SELECT 'Ok (3)';
|
||||
SET max_execution_speed = 0;
|
||||
|
||||
SET max_execution_speed_bytes = 8000000;
|
||||
TRUNCATE TABLE times;
|
||||
|
||||
INSERT INTO times SELECT now();
|
||||
SELECT count() FROM numbers(2000000);
|
||||
INSERT INTO times SELECT now();
|
||||
|
||||
SELECT max(t) - min(t) >= 1 FROM times;
|
||||
SELECT 'Ok (4)';
|
||||
SET max_execution_speed_bytes = 0;
|
||||
|
||||
-- Note that 'min_execution_speed' does not count sleeping due to throttling
|
||||
-- with 'max_execution_speed' and similar limits like 'priority' and 'max_network_bandwidth'
|
||||
SET max_execution_speed = 1000000, min_execution_speed = 2000000;
|
||||
-- And this query will work despite the fact that the above settings look contradictory.
|
||||
SELECT count() FROM numbers(1000000);
|
||||
SELECT 'Ok (5)';
|
Loading…
Reference in New Issue
Block a user