Estimate the progress of a query
For longer running queries, you might want to track roughly how much progress the query has made. You can use the
system.processes table to get information about your query and estimate it's progress.
You will need the
query_id of the query you want to check. For example:
(100 * read_rows) / total_rows_approx AS progress_percentage,
elapsed AS elapsed_time,
(elapsed / (read_rows / total_rows_approx)) * (1 - (read_rows / total_rows_approx)) AS estimated_remaining_time
WHERE query_id = 'a6fca6dc-1a9a-4243-b633-17b090fdfccc'
estimated_remaining_time: 145.8186195650688DROP TABLE table_name;
You can also use