1. Home
  2. Knowledge Base
  3. Check Queries That Being Processed In ClickHouse

Check Queries That Being Processed In ClickHouse

Following sql query will show you queries that being processed.

SELECT user, address as client, elapsed as time_seconds, formatReadableSize(memory_usage) as memory, formatReadableSize(read_bytes) as read, read_rows, total_rows_approx as total_rows, query_id, substring(query,1,40) as query
FROM system.processes
ORDER BY elapsed desc FORMAT PrettyCompact

Example output:

Query id: 0c5031d3-37b8-4f62-894d-084c8e923c45

Row 1:
──────
user:         default
client:       ::ffff:127.0.0.1
time_seconds: 0.004283
memory:       0.00 B
read:         0.00 B
read_rows:    0
total_rows:   0
query_id:     0c5031d3-37b8-4f62-894d-084c8e923c45
query:        SELECT user, address as client, elapsed 

1 row in set. Elapsed: 0.012 sec. 

 

 

Was this article helpful?

CHISTADATA IS COMMITTED TO OPEN SOURCE SOFTWARE AND BUILDING HIGH PERFORMANCE COLUMNSTORES

In the spirit of freedom, independence and innovation. ChistaDATA Corporation is not affiliated with ClickHouse Corporation 

Need Support?

Can't find the answer you're looking for?
Contact Support

ChistaDATA Inc. Knowledge base is licensed under the Apache License, Version 2.0 (the “License”)

Copyright 2022 ChistaDATA Inc

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.