[pgadmin4] Explain plans
От | Joao De Almeida Pereira |
---|---|
Тема | [pgadmin4] Explain plans |
Дата | |
Msg-id | CAE+jjammFx-+g40r2kWOJKfEVJoLtp0b=xJj6yJkXsUsPcMK9Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [pgadmin4] Explain plans
Re: [pgadmin4] Explain plans |
Список | pgadmin-hackers |
Move the SQL to generate explain plans to backend
For this approach we would create a new endpoint to generate an explain plan and when we click the explain plan buttons instead of doing a new SQL query we would call the new endpoint and wait for the explain plan to be generated- Pros:
- All SQL related code is in the backend
- Extract more code from SQLEditor into smaller and more testable/maintainable modules
- Cons:
- Major Revamp of SQLEditor
- If explain plan takes to long to generate we will be waiting for it in the foreground instead of polling
- Pros:
Add parameters while executing SQL
If we add parameters in the SQL query request we send to the backend, informing the backend that the SQL query is a Explain Plan to be executed(The response can have a flag saying that this is an explain plan, instead of assuming from the return values that it was an explain plan)- Pros:
- All SQL related code is in the backend
- Leverage the current polling system
- Cons:
- Add more logic to an already complex SQLEditor
- Pros:
Disable Explain plan buttons
Disable/Enable the Explain plan buttons depending on the type of database, this would also include the tab in the bottom of the SQLEditor- Pros:
- Simpler solution
- Cons:
- Not really a good implementation, because all databases support explain plans
- There will still be SQL in both frontend and backend
- Looks more like a temporary fix instead of a solution
- Pros:
В списке pgadmin-hackers по дате отправления: