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

chore: better results for postgres visual explain #1678

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ImJustToNy
Copy link

@barryvdh
Copy link
Owner

@tpetry thoughts?

@tpetry
Copy link
Contributor

tpetry commented Sep 24, 2024

Using the ANALYZE mode is ok too. I didnt initially use it as it executes the query again (and slower). With the old approach it would have made the debugbar really slow.

with the new approach its feasible. But when a query takes 30s to execute, the user has to wait those 30s. And there is no indication in the UI that something is still working. From a UX perspective it would be weird and in my opinion the UI needs to changed to reflect that something is working for so long.

@tpetry
Copy link
Contributor

tpetry commented Sep 26, 2024

Another issue is that ANALYZE really executes the query. The current implementation only checks whether the select keyword is included in the query to allow it for analyzing. But data manipulation queries involving a subquery (UPDATE example set col = (SELECT ...)) would also be included in that simple check.

This is not a problem for the EXPLAIN statement that doesn't run the statement. But with ANALYZE the behaviour may be weird (or produce data inconsistency issues) when the same data manipulation is executed multiple times.

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

Successfully merging this pull request may close these issues.

3 participants