laravel-debugbar
laravel-debugbar copied to clipboard
chore: better results for postgres visual explain
As per:
At https://explain.dalibo.com/
@tpetry thoughts?
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.
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.