SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Tool for SQL Server code tuning


Tool for SQL Server code tuning

Author
Message
Feivel
Feivel
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5800 Visits: 1973
Hello experts,

Is there a free or a paid tool/software that can be used to provide t-sql recommendations or that can provide corrections to the t-sql statement to optimize the code for e.g see below...suggesting some changes to use "in" instead of "exists". I knew of a tool that was used to do this in the past and it was "Lecco SQL Expert". However, this isn't available anymore. Is there an alternative SQL tool that can be a paid tool or free which can do this.

SELECT
some_data
FROM details_table D
WHERE EXISTS (SELECT
1
FROM lookup_table L
WHERE L.lookup_column = D.lookup_column
AND L.matching_column = 'Yes')

can be written as
SELECT /*+ FIRST_ROWS */
some_data
FROM details_table D
WHERE lookup_column IN (SELECT
L.lookup_column
FROM lookup_table L
WHERE L.matching_column = 'Yes')


Sue_H
Sue_H
SSC Guru
SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)

Group: General Forum Members
Points: 67020 Visits: 13928


Quest bought them out years ago. I'm not sure if it's related to the SQL Optimizer product that Quest has.
SQL Optimizer does do the alternative sql statements you mention and benchmarks the alternatives. You might want to see if they have a trial version to test.

Sue



Feivel
Feivel
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5800 Visits: 1973
Sue_H - Wednesday, November 22, 2017 11:18 AM


Quest bought them out years ago. I'm not sure if it's related to the SQL Optimizer product that Quest has.
SQL Optimizer does do the alternative sql statements you mention and benchmarks the alternatives. You might want to see if they have a trial version to test.

Sue

I am not sure if I can buy a license for that. I went through their portal and I couldn't find that. I think I might have to call their sales team for this. Any other alternatives?

Sue_H
Sue_H
SSC Guru
SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)SSC Guru (67K reputation)

Group: General Forum Members
Points: 67020 Visits: 13928
ffarouqi - Wednesday, November 22, 2017 11:37 AM
Sue_H - Wednesday, November 22, 2017 11:18 AM


Quest bought them out years ago. I'm not sure if it's related to the SQL Optimizer product that Quest has.
SQL Optimizer does do the alternative sql statements you mention and benchmarks the alternatives. You might want to see if they have a trial version to test.

Sue

I am not sure if I can buy a license for that. I went through their portal and I couldn't find that. I think I might have to call their sales team for this. Any other alternatives?


I just did a search on: SQL Optimizer Quest
and the download link was right there.
SQL Optimizer for SQL Server - Download Software

And then when I pulled out the word Quest and just had SQL Optimizer, it provided links to other tools. You may want to try searching on that and trying some of those other options.

Sue



Feivel
Feivel
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5800 Visits: 1973
Sue_H - Wednesday, November 22, 2017 11:48 AM
ffarouqi - Wednesday, November 22, 2017 11:37 AM
Sue_H - Wednesday, November 22, 2017 11:18 AM


Quest bought them out years ago. I'm not sure if it's related to the SQL Optimizer product that Quest has.
SQL Optimizer does do the alternative sql statements you mention and benchmarks the alternatives. You might want to see if they have a trial version to test.

Sue

I am not sure if I can buy a license for that. I went through their portal and I couldn't find that. I think I might have to call their sales team for this. Any other alternatives?


I just did a search on: SQL Optimizer Quest
and the download link was right there.
SQL Optimizer for SQL Server - Download Software

And then when I pulled out the word Quest and just had SQL Optimizer, it provided links to other tools. You may want to try searching on that and trying some of those other options.

Sue

I tried creating a trial account but it says that I haven't purchased this product and need to contact customer service and there is no trial download available for this. I will have to speak to someone over there in order to get a trial link.

Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)SSC Guru (847K reputation)

Group: General Forum Members
Points: 847162 Visits: 46672
ffarouqi - Wednesday, November 22, 2017 10:01 AM
Hello experts,

Is there a free or a paid tool/software that can be used to provide t-sql recommendations or that can provide corrections to the t-sql statement to optimize the code for e.g see below...suggesting some changes to use "in" instead of "exists". I knew of a tool that was used to do this in the past and it was "Lecco SQL Expert". However, this isn't available anymore. Is there an alternative SQL tool that can be a paid tool or free which can do this.

SELECT
some_data
FROM details_table D
WHERE EXISTS (SELECT
1
FROM lookup_table L
WHERE L.lookup_column = D.lookup_column
AND L.matching_column = 'Yes')

can be written as
SELECT /*+ FIRST_ROWS */
some_data
FROM details_table D
WHERE lookup_column IN (SELECT
L.lookup_column
FROM lookup_table L
WHERE L.matching_column = 'Yes')


As a bit of a sidebar, if the lookup column on the lookup table is unique and has an index on it, both of the methods might suck compare to a good ol' fashioned INNER JOIN. If you need to be able to answer "No" when not found, then both will be better than an outer join and, depending on the data and table structure, could be a tie with each other for performance.

I guess my question here is... you seem to have some practical knowledge... why not just do the test yourself instead of using software that you'd have to test the recommendations of anyway?


--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Feivel
Feivel
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5800 Visits: 1973
Jeff Moden - Wednesday, November 22, 2017 2:42 PM
ffarouqi - Wednesday, November 22, 2017 10:01 AM
Hello experts,

Is there a free or a paid tool/software that can be used to provide t-sql recommendations or that can provide corrections to the t-sql statement to optimize the code for e.g see below...suggesting some changes to use "in" instead of "exists". I knew of a tool that was used to do this in the past and it was "Lecco SQL Expert". However, this isn't available anymore. Is there an alternative SQL tool that can be a paid tool or free which can do this.

SELECT
some_data
FROM details_table D
WHERE EXISTS (SELECT
1
FROM lookup_table L
WHERE L.lookup_column = D.lookup_column
AND L.matching_column = 'Yes')

can be written as
SELECT /*+ FIRST_ROWS */
some_data
FROM details_table D
WHERE lookup_column IN (SELECT
L.lookup_column
FROM lookup_table L
WHERE L.matching_column = 'Yes')


As a bit of a sidebar, if the lookup column on the lookup table is unique and has an index on it, both of the methods might suck compare to a good ol' fashioned INNER JOIN. If you need to be able to answer "No" when not found, then both will be better than an outer join and, depending on the data and table structure, could be a tie with each other for performance.

I guess my question here is... you seem to have some practical knowledge... why not just do the test yourself instead of using software that you'd have to test the recommendations of anyway?

Unfortunately, my experience on T-SQL side is very minimal and somehow code logic is not something that I am really good at...hence the need. In case if I ask someone in the forum to help me out with a problem that I am struggling with they would come back and say that we aren't paid to help you fix the code which is understandable but what other means do I have if there is no help and I can't do it myself....not every DBA is exceptional in T-SQL.

goher2000
goher2000
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3722 Visits: 1552
I never used it, you can try and let us know.


https://www.eversql.com/



Feivel
Feivel
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5800 Visits: 1973
goher2000 - Tuesday, January 23, 2018 10:04 AM
I never used it, you can try and let us know.


https://www.eversql.com/

Sure. I will try and let it know.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search