Skip to content

Wrong (weird) Estimated query execution time (max_execution_time / max_execution_speed) #6417

@den-crane

Description

@den-crane

19.13.1.1010

create table ES(A String) Engine=MergeTree order by tuple();
insert into ES select toString(number) from numbers(10000000);
SET max_execution_time = 1, max_execution_speed = 1000000;
SET max_threads=1
set max_block_size=1000000;

SELECT * FROM ES LIMIT 1 format Null;
DB::Exception: Estimated query execution time (1003499.9296 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 10
DB::Exception: Estimated query execution time (8027.156479999999 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 100
DB::Exception: Estimated query execution time (1605.531648 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 1000
DB::Exception: Estimated query execution time (602.1019648 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 10000
B::Exception: Estimated query execution time (4.01307648 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 100000
B::Exception: Estimated query execution time (4.013979648 seconds) is too long.
Maximum: 1. Estimated rows to process: 10035200.

LIMIT 1000000
1000000 rows in set. Elapsed: 1.125 sec.
Processed 1.12 million rows, 16.85 MB (997.34 thousand rows/s., 14.97 MB/s.)


set max_block_size=1024

LIMIT 1
1 rows in set. Elapsed: 0.010 sec.

LIMIT 10000
DB::Exception: Estimated query execution time (13.020744 seconds) is too long.
Maximum: 1. Estimated rows to process: 10002432.

LIMIT 100000
100000 rows in set. Elapsed: 0.005 sec.
Processed 111.62 thousand rows, 1.73 MB (23.74 million rows/s., 368.77 MB/s.)

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions