pg_query_state icon indicating copy to clipboard operation
pg_query_state copied to clipboard

Add progress bar during query execution to track progress.

Open sokolcati opened this issue 1 year ago • 0 comments

Progress bar is run-time SQL-query progress indicator.

Function progress_bar(pid) extracts the current query state from backend with specified 'pid'. Then gets the numerical values of the actual rows and total rows and count progress for the whole query tree. Function returns numeric value from 0 to 1 describing the measure of query fulfillment. This function can be used to be embedded in the PostgreSQL GUI.

To intuitively track progress without using a graphical client, you can use the additionally implemented function progress_bar_visual(pid, delay). It prints state every period specified by 'delay' (in seconds).

sokolcati avatar Jul 03 '24 09:07 sokolcati