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

Design a powerful & modern SQL debug page #5

Open
dgrelaud opened this issue Oct 20, 2021 · 0 comments
Open

Design a powerful & modern SQL debug page #5

dgrelaud opened this issue Oct 20, 2021 · 0 comments

Comments

@dgrelaud
Copy link
Member

dgrelaud commented Oct 20, 2021

Draw an HTML admin page for EFIK which provide this feature.

  • possibility to see all requests (SQL and HTTP) without details (ex. one line per request with execution time).
  • One color per line type (HTTP inbound, SQL query, HTTP outbound, ...), Or one dynamic color per request id to see all consequences of a request ?
  • possibility to filter and see only SQL queries, or only inbound HTTP request, only outbound HTTP requests...
  • possibility to see without clicking on the line:
    • the full URL for HTTP
    • an extract of the SQL query?
    • the execution time
    • an icon to see if it hits the cache
  • highlight request with a {{PRINT}} inside
  • possibility to see intermediate CTE results
  • possibility to see execution plan (use ANALYZE JSON, use extension auto_analyze) !
  • Show tips to optimize requests:
    • detect Index Scan without Condition in PG plan -> means Seq Scan (https://explain.depesz.com/s/6OXV)
    • detect bad trigger (parallel, cost, executed each time, ...)
    • detect multiple update of the same row (SQL)
    • detect bad index usage (compare WHERE close with index, menu_set_date vs menu_get_date ?)
  • The source of data are stored in log files (parsed like a CSV by efik in a streaming mode) -> we should be able to parse multiple gigabyte of log files.
  • Idea: Possibility to start a global BEGIN transaction and replay a request to see the progression between each optimizations?

https://www.postgresql.org/docs/14/auto-explain.html

TODO

Find how we activate this debug mode?
In debug mode, we log all request like without {{PRINT}}???

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

No branches or pull requests

1 participant