microsoft / SqlNexus

SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQL LogScout, SQLDiag or PSSDiag. It can dramatically reduce the amount of time you spend manually analyzing data.
MIT License
348 stars 99 forks source link

Expose custom queries and/or the report queries in SQL Nexus so users can customize their data mining #239

Closed PiJoCoder closed 10 months ago

PiJoCoder commented 1 year ago
  1. Perhaps put a link to https://github.com/microsoft/SqlNexus/wiki/Reports-via-SQL-Queries on the main page report when SQL Nexus launches
  2. Expose the query text for the report in each query. We can do this by creating TextBox in every report and displaying the =DataSets!DataSet1.CommandText where DataSet1 is the name of the data set where the query lives. We can make the text hidden by default but visible by toggling some control (see Database Configuration and Properties report for an example)
PiJoCoder commented 12 months ago

@hacitandogan, would you like to think about this one next. The request here is to expose the actual query behind the report in case people want to use it for direct analysis in SSMS. I can demo if you'd like

hacitandogan commented 12 months ago

@PiJoCoder , sure I will check this one and ping you for the demo and sync.

PiJoCoder commented 12 months ago

@PiJoCoder , sure I will check this one and ping you for the demo and sync.

You can use logic similar to this (in server configuration report), where the text of the query is not exposed at first, but we can have some toggle +/- to show it

image

hacitandogan commented 11 months ago

@PiJoCoder

I did a sample on one of the reports to test this.

This is server configuration report , which has multiple datasets;

Hidden:

image

Visible:

image

Tried to keep it plain and simple but should we highlight that more or is this good ? Once we clarify how it should look , my plan is to use same approach on the other reports as well.

PiJoCoder commented 11 months ago

@PiJoCoder

I did a sample on one of the reports to test this.

This is server configuration report , which has multiple datasets;

Hidden: image

Visible: image

Tried to keep it plain and simple but should we highlight that more or is this good ? Once we clarify how it should look , my plan is to use same approach on the other reports as well.

I agree with you that plain and simple is good. I don't think we need to go fancy on this. One thing that I image is to add this at the bottom of reports, away from other report data so people don't get confused. Is that how you image it too?

hacitandogan commented 11 months ago

@PiJoCoder , I sent a PR for one report only so you can also see and test this. If we are OK with this , I can implement the same for all reports.

PiJoCoder commented 11 months ago

@PiJoCoder , I sent a PR for one report only so you can also see and test this. If we are OK with this , I can implement the same for all reports.

Thank you! I'll test and let you know

PiJoCoder commented 11 months ago

@PiJoCoder , I sent a PR for one report only so you can also see and test this. If we are OK with this , I can implement the same for all reports.

Looks great, @hacitandogan! Let's proceed with it. Thank you

hacitandogan commented 10 months ago

PR merged , closing this item.