bendsql icon indicating copy to clipboard operation
bendsql copied to clipboard

feat: Add `explain analyze graphical` feature for SQL performance visualization

Open Maricaya opened this issue 1 year ago • 2 comments

  • Implemented a new explain analyze graphical command to visualize SQL performance analysis.
  • Integrated front-end graphical components to display detailed query execution plans. This update provides an intuitive interface for users to analyze and optimize SQL queries visually.

https://github.com/user-attachments/assets/fe276f03-a176-43a2-9b9a-8097201dda12

Maricaya avatar Sep 27 '24 05:09 Maricaya

Please remove the "✨" in the title.

Chasen-Zhang avatar Sep 27 '24 06:09 Chasen-Zhang

The contributor is from the Summer of Open Source Promotion Plan. Please help with the review when it is ready. @PsiACE @zhang2014 @everpcpc

Chasen-Zhang avatar Sep 27 '24 06:09 Chasen-Zhang

Please resolve the conflict first @Maricaya

Chasen-Zhang avatar Oct 15 '24 01:10 Chasen-Zhang

@sundy-li Request to merge into the main branch, thanks!

Chasen-Zhang avatar Oct 16 '24 03:10 Chasen-Zhang

@sundy-li Request to merge into the main branch, thanks!

do we need to wait for another pr in databend?

@Maricaya please add frontend/** to licenserc.toml to fix the license check.

sundy-li avatar Oct 18 '24 03:10 sundy-li

@sundy-li Request to merge into the main branch, thanks!

do we need to wait for another pr in databend?

@Maricaya please add frontend/** to licenserc.toml to fix the license check.

Let's wait for the databend pr to merge into the main branch

Chasen-Zhang avatar Oct 18 '24 04:10 Chasen-Zhang

@sundy-li Request to merge into the main branch, thanks!

do we need to wait for another pr in databend? @Maricaya please add frontend/** to licenserc.toml to fix the license check.

Let's wait for the databend pr to merge into the main branch

got it!

Maricaya avatar Oct 18 '24 04:10 Maricaya

@sundy-li This PR https://github.com/databendlabs/databend/pull/16543 is already in the main branch.

Chasen-Zhang avatar Oct 21 '24 03:10 Chasen-Zhang

@sundy-li this PR is ready, would you mind merging it?

Maricaya avatar Oct 23 '24 02:10 Maricaya

@Maricaya Ok, It will be merged after ci pass.

please commit after you check it in local:

cargo fmt --all -- --check
typos
..

sundy-li avatar Oct 23 '24 02:10 sundy-li

@Maricaya Thanks for the contribution.

Some comments about this pr.

I checked the codes and looks like it will start a new server to listen to a free port in each graphical query, this may cause too much port resource usage.

  1. Can we start a dedicated HTTP server as a service if it's is_repl is true?
  2. If we receive graphical query in is_repl mode, we can generate a random URL to render the data for this query.

sundy-li avatar Oct 23 '24 04:10 sundy-li

cool, glad to see this project has landed, thanks @Maricaya @Chasen-Zhang @sundy-li

PsiACE avatar Oct 23 '24 11:10 PsiACE

@Maricaya Thanks for the contribution.

Some comments about this pr.

I checked the codes and looks like it will start a new server to listen to a free port in each graphical query, this may cause too much port resource usage.

  1. Can we start a dedicated HTTP server as a service if it's is_repl is true?
  2. If we receive graphical query in is_repl mode, we can generate a random URL to render the data for this query.

Got it, thanks for the feedback. Let me finish the CI process first. Here's the PR: https://github.com/databendlabs/bendsql/pull/486. I'll let you know once it's ready.

Maricaya avatar Oct 23 '24 19:10 Maricaya