检测到不合格的连接 [英] Unqualified Join(s) detected

查看:66
本文介绍了检测到不合格的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将从2008年升级到2017年的SQL Server。我们运行了DMA工具并找到了一些关于某些主题的报告。其中一个主题是他们当前说的数据库有不合格的连接,它使用旧式连接而不是使用ANSI新连接语法(LEFT / RIGHT
OUTER join,FULL OUTER join等)。以下是DMS报告输出。我想知道吗  SQL Server仍支持旧式连接,或者我必须使用ANSI新连接语法(LEFT / RIGHT OUTER join,FULL OUTER join等)?

We are going to upgrade SQL Server from 2008 to 2017. We ran DMA tool and found some reports on some topics. Among them one topic they are saying currently database has unqualified join which use old style join rather than using ANSI new join syntax (LEFT/RIGHT OUTER join, FULL OUTER join etc). Below is DMS report output. I want to know does  SQL Server still support old style join or I must use ANSI new join syntax (LEFT/RIGHT OUTER join, FULL OUTER join etc)?

问题 -

检测到不合格的加入



受影响的对象详细信息

对象[dbo]。[abc_procedure]使用旧样式连接语法,在数据库兼容级别为90或更高时性能较差。

Object [dbo].[abc_procedure] uses the old style join syntax which can have poor performance at database compatibility level 90 and higher.

推荐答案

如果您使用的是 =和对于外连接,您需要重写代码以使用LEFT JOIN(或RIGHT JOIN)。对于兼容级别90,已经在SQL 2005中删除了对旧式连接的支持。并且SQL 2008是支持compat级别80的最后一个版本
,这些运算符终于消失了。

If you are using = and = for outer joins, you need to rewrite your code to use LEFT JOIN (or RIGHT JOIN). Support for the the old-style joins were dropped already in SQL 2005 for compatibility level 90. And with SQL 2008 being the last version to support compat level 80, these operator are finally dead and gone.

请注意,当你从compat 80级转到更高的compat级别时,还有一些可能会让你感到惊讶的意外。

Beware that when you move from compat level 80 to a higher compat level, there are a few more surprises that can bite you.


这篇关于检测到不合格的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆