Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Run query" button should be disable meanwhile a query is in process. #78

Open
KamleshKumar427 opened this issue Dec 13, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@KamleshKumar427
Copy link
Contributor

Observation: I tried clicking the "run query" button multiple times while a query was processing, Meanwhile it processed the empty queries and resulted in "Query not entered!" multiple times.
It can be annoying for the user when a query takes much time to process and the user keeps clicking the button.

Recommendation: "Button should be disabled until the previous query is being processed".
"Procedure": I throttled the browser to 3G, and run a single query, and clicked the "run query" button multiple times.

Screenshot from 2022-12-13 18-07-07

@KamleshKumar427 KamleshKumar427 added the enhancement New feature or request label Dec 13, 2022
@Nimra-1234
Copy link
Contributor

Hi @KamleshKumar427
You are right.I tried the same approach and observe this, its quite annoying.

Screenshot from 2022-12-18 13-30-58

@AhmarZaidi
Copy link
Contributor

What if the "run query" button is only clickable when the query box is not empty. This could prevent showing error when clicking multiple times. Additionally, this could allow execution a faster query while a slower query is still running though I'm not sure if this would work because I was not able to test it. Even after throttling, the first query would return faster than I could run a second one.

@KamleshKumar427
Copy link
Contributor Author

Hello, @AhmarZaidi good observation to run multiple queries simultaneously.
Since PostgreSQL is able to handle 100+ clients at a time, But for that, I guess PostgreSQL opens multiple sessions.
Therefore I am not sure whether a single session can run multiple queries or not.
I will confirm it and then will let you know.

@marodins
Copy link
Contributor

This wouldn't be appropriate as it would block multiple queries being submitted. Client picks an available connection from a pool of open connections to submit other queries. Here's an example of a first query that takes longer to process than the second query. Second query made returns first.
Screenshot from 2022-12-26 12-06-02-2
Screenshot from 2022-12-26 12-14-10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants