Skip to content

Commit

Permalink
Added selection for query explain plan
Browse files Browse the repository at this point in the history
  • Loading branch information
mail4umar committed Jun 11, 2024
1 parent f32af0c commit ce9067d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,18 @@
"source": [
"button_run_explain_plan = widgets.Button(description=\"Run Explain Plan\")\n",
"explain_output = widgets.Output()\n",
"explain_dropdown = widgets.Dropdown(\n",
" options=[i for i in range(len(qprof.transactions))],\n",
" description='Select Query Index',\n",
" disabled=False,\n",
" layout={'width': \"300px\"}\n",
")\n",
"explain_dropdown.style.description_width = '130px'\n",
"\n",
"def on_button_clicked_run_explain_plan(b):\n",
" explain_output.clear_output()\n",
" with explain_output:\n",
" qprof.set_position(explain_dropdown.value)\n",
" qprof.get_qplan_explain()\n",
"\n",
"\n",
Expand All @@ -631,7 +640,7 @@
" display(widgets.HTML(run_query_result._repr_html_()))\n",
"\n",
"button_run_explain_plan.on_click(on_button_clicked_run_explain_plan)\n",
"explain_plan_widget = widgets.VBox([button_run_explain_plan, explain_output]) "
"explain_plan_widget = widgets.VBox([explain_dropdown, button_run_explain_plan, explain_output]) "
]
},
{
Expand Down

0 comments on commit ce9067d

Please sign in to comment.