Solved

tool to calculate statistics on tsql SELECT query

Posted on 2013-11-09
3
620 Views
Last Modified: 2013-11-13
is there a tool that scan a big query and tell statistics as to how many SELECTs, GROUPS, how many columns retrieved to bring the results, how many joins, how many orders, distincts, how many rows read to bring the results etc.
0
Comment
Question by:25112
3 Comments
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
ID: 39635776
I had a performance tuning class where the instructor introduced us to freeware SQL Sentry Plan Explorer , which allows you to see the multiple execution plans and various stats on multiple queries in a Stored Procedure.  Pretty damn handy.

I need to dig into this tool deeper.
Also, I think the freeware part has certain limitations, whereas when you purchase a license it has no limitations.

Good luck.
0
 
LVL 48

Accepted Solution

by:
PortletPaul earned 250 total points
ID: 39636421
"how many orders, distincts"...
yikes, hopefully only one order (at the end)

and distinct only ever used in a very limited way.
see: Select Distinct is returning duplicates ... look for the "Hail Mary Distinct"

"how many rows read to bring the results"
for this you do want the explain plan, and those numbers get displayed better using  SQL Sentry Plan Explorer
0
 
LVL 5

Author Comment

by:25112
ID: 39644795
will use it. thanks.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question