I want to add a progress bar that showing the progress of data loading from database related a query.
This is not possible because the query doesn’t provide any kind of status. You could simulate one by having a progress bar update by random percentages until the query returns, but this is the closest you can get.