clickhouse-playground icon indicating copy to clipboard operation
clickhouse-playground copied to clipboard

[FEATURE] checkbox "show query stats"

Open Slach opened this issue 3 years ago • 3 comments

Add each query execution time, cpu, rows ,RAM usage

Slach avatar Dec 09 '22 05:12 Slach

Hi! It's a good idea, but there are some architectural features of the current query execution logic which prevent it from being implemented.

At the moment, queries are executed with clickhouse-local, and plain output is shown to a user. User input is executed in one command, it's not splitted into several queries.

I will think about a special mode when queries are executed with HTTP (or other) interface. It wasn't implemented because it's not clear how to show result of multiple queries execution, which can contain selected rows and errors mixed with each other.

lodthe avatar Dec 09 '22 17:12 lodthe

maybe clickhouse-local --time --echo could help?

Slach avatar Dec 10 '22 07:12 Slach

For SELECT 1 it returns

SELECT 1       # query
1              # result
0.001          # timing

This representation is familiar for advanced users, but it's confusing for others. I will think about a special mode where this information is available. It might work, thank you!

lodthe avatar Dec 27 '22 01:12 lodthe