0
我的查询需要很长时间。提高查询性能
select distinct JobName,
ValidationType,
AppName,
Result,
ResultType,
ErrorWarningDetails,
CvtStartDateTime
from contentvalidationjobdetails with (nolock)
where [email protected]
and [email protected]
and (cast(cvtstartdatetime as date) > @Date)
and concat(Jobname,validationtype) not in (
select concat(jobname,validationtype)
from Contentvalidationjobdetails with (nolock)
where appname = @AppName
and CVTStartDateTime = (
select top 1 teststartdatetime
from contentvalidation
where [email protected]
and Teststartdatetime<@Date
order by teststartdatetime desc
)
)
我知道concat(jobname,validationtype)需要时间。如何处理这个。
是的,它是sql服务器 –
我想找到所选日期和日期以上的新作业名称。我连接了jobname和validationtype,因为它们形成了唯一的值 –
您是否试图显示执行计划? – Axarydax