Tool for comparison of SQL Server query plans? [closed] - sql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of a tool that can be used to compare (relatively complex) query plans? I'm not looking for a guide to query plans, but just a tool that enables me to quickly see e.g. the different index use.
EDIT: just to make it clear, I'm not looking for information about the plan, but a tool that can quickly point out the differences between two plans (I know, I could do that myself, but the size of the plan(s) make that difficult).

I'm not aware of a ready-made tool for this, just if you use SET SHOWPLAN_XML ON to get the plans in XML format you can pretty-format them in Visual Studio, and then compare with your favourite text comparison tool.
And you can also right click on the plan in SSMS and choose Save Execution Plan as... to save to a file.

There is a tool called PICASSO - http://dsl.serc.iisc.ernet.in/projects/PICASSO/index.html which has an option to compare 2 query plans, provided the queries are the same but with different selectivities.
The to generate the plan differences can be used in your case as it is freely available.

I find that SQL Sentry Plan Explorer (free) is a useful tool analyzing queries, and also comparing them, as highlighted in this blog post.

I generally just compare execution plans with a text compare tool - I also find that for complex plans its useful to look at the raw Xml of the plan just for the ability to search for an index / table to see where it appears in the plan.

Related

Are there any tools to visualize a complicated SQL join? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Given that many frameworks will create complicated (and maybe not so readable/logical) SQL queries, it would seem that having a tool to show, visually, how the joins were done might be a helpful tool. But I have not found such a tool.
I took a query that included a lot of tables and created a graphic as an example of what I think would be the output from such a tool:
The text on the links are the field names that are used in the join. The bold items are inputs to the query. The table names ending in digits are just repeat instances of the same table (ie Partner and Partner2 are the same table, just part of the query more than once).
I would like to be able to drop an SQL query into a tool and see a diagram like this. Possible?
I found this tool, it might be useful.
http://queryviz.com/online/
Although the SQL syntax supported looks to be quite limited..
You can get this sort of output using SQL Analyzer with SQL Server. Something similar exists for postgresql: I've never seen anything graphical for MySql or Oracle.
In other words: nothing generic (which is perhaps what one would expect given the complex and individual nature of database optimizer engines).

Ready web query interface to SQL databases [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Do you know any free tool which would constitute a web-based SQL database generic query interface, incl.:
(mainly) allowing to type in an SQL query and display the result in some nice way
the interface should allow for some basic security - allowing only SELECT queries
the very need is to support MS SQL Server, but Oracle support would be useful
should run against an existing database instance without any re-configuration needed
might be simple, no need to browse tables, analyze database columns or anything else you would experience in SQLDeveloper or SQL Server Management Studio
Platform / language / etc. is of second importance.
The StackExchange Data Explorer has this functionality (example) and it is open source, so you may be able to just install and make use of it, or even extract the relevant code.
Perhaps something like the SQL Fiddle?
Obviously, this is mainly for demonstration purposes - it won't help you if you want to install it on top of your own database.
Re:dash (Redash) is a promising new open-source player on the market. From their own website:
re:dash is our take on freeing the data within our company in a way
that will better fit our culture and usage patterns.
Prior to re:dash, we tried to use traditional BI suites and discovered
a set of bloated, technically challenged and slow tools/flows. What we
were looking for was a more hacker'ish way to look at data, so we
built one.

Which Oracle SQL query optimization tool to use? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Yesterday I read an article in PowerTimes ( dec. 2002 :) ) about a great SQL Optimization tool called SQL Expert created by Leccotech. This company is probably taken over by Quest Software and I faced a lot of bugs in the trial version of Quest SQL Optimizer 8.0.0.
Which software do you prefer to optimize your Oracle ( 10 or 11 ) SQL queries?
Regards,
Marinus
I too use explain plan (and a decent grasp on Oracle Concepts and the optimizer), but I'll also mention that Oracle develops a SQL Developer IDE that is getting more advanced than when I first used it.
SQL Developer now has a SQL tuning advisor that is worth checking out. I have not yet used the latest version, but will be doing so soon.
Hope it helps.
I use EXPLAIN PLAN with the SQL client of my choice
I also use the explain plan.
The best method to tune a query is to know as much about what it's purpose is and what it is doing.
Learn about the tables, indexes, constraints, data most importantly, and how the CBO (or RBO) is going to retrieve the data.
You can use software to point and click your way through, but if you don't know yourself what the query and oracle is doing, you won't get very far.

Freeware Query Builder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for some freeware Query Builder.
Query Builder in Aqua Data Studio allows you to visually build queries:
select the column you want returned
generates joins for you(you just select by which columns you want to join it)
Good question! I thought there were many DB tools that fit your description, but when I checked a commonly-sourced Wikipedia article (see comment below), I found that most free/open source DB management software does not have a visual query builder feature! (I build my queries from scratch, so this is not a feature I particularly need.)
The freeware version of Toad for Data Analysts is a good bet. You can download and use it for 120 days. After that time, you need to reinstall on your PC. You might need to check to see if you will get write-access to non-Oracle databases, but I do know you can at least get read access to most non-Oracle DBs.
You might also like SQL Developer, which has a more robust community of users than that of the Freeware Toad for Data Analysts. That will only give you read-only access to certain non-Oracle databases.

SQL proc diagram generating software of a program flow [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a couple of very long procs in Oracle 2000+ lines with lots of calls. And I'd like to generate program flow Diagram (algorithm) for better understanding of the process for further refactoring.
It's not the code I wrote so I don't know the logic enough.
What would you advise to do in this case? I tried to draw a text-like flow but it takes lots of time and still hard to cover all the logic for understanding.
The best approach I see would be flow chart generated from SQL proc with links to "jump" between code and chart.
UPDATE:
Found couple of software doing the same:
ClearSQL - makes CRUD diagrams, call map, and flow chart.
Quest SQL Navigator Expert (using it now): it has Outline (makes code flow with ability to collapse-expand blocks of code - really cool one!), Code Explorer (enumerates all func, params with links ti SQL text - just in interface) features
There is a product, Code Visual to Flowchart, which can take code in various languages and do something like what you're describing. Unfortunately though Oracle doesn't appear to be in the list of supported languages, but Microsoft TSQL is; maybe you could at least translate your proc from Oracle into MS and use this to roughly visualize your proc's flow.
Failing that burnall's suggestion sounds like the best way to go, essentially divide and conquer.
I doubt that such tool, even if it exists could help better understanding. I think, time of big flow-charts is over.
I would advice to understand logic with step-by-step refactoring:
iteratively extract parts of procedure to smaller procedures and add tests.